Class: Astronoby::NullCache

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/astronoby/cache.rb

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object



140
141
142
# File 'lib/astronoby/cache.rb', line 140

def [](key)
  nil
end

#[]=(key, value) ⇒ Object



144
145
146
# File 'lib/astronoby/cache.rb', line 144

def []=(key, value)
  value
end

#clearObject



152
153
# File 'lib/astronoby/cache.rb', line 152

def clear
end

#fetch(key) ⇒ Object



148
149
150
# File 'lib/astronoby/cache.rb', line 148

def fetch(key)
  yield
end

#max_size=(new_size) ⇒ Object



159
160
# File 'lib/astronoby/cache.rb', line 159

def max_size=(new_size)
end

#sizeObject



155
156
157
# File 'lib/astronoby/cache.rb', line 155

def size
  0
end