Class: Lumber::LevelUtil::MemoryCacheProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/lumber/level_util.rb

Instance Method Summary collapse

Constructor Details

#initializeMemoryCacheProvider

Returns a new instance of MemoryCacheProvider.



14
15
16
# File 'lib/lumber/level_util.rb', line 14

def initialize
  @cache = {}  
end

Instance Method Details

#read(key) ⇒ Object



18
19
20
# File 'lib/lumber/level_util.rb', line 18

def read(key)
  @cache[key]
end

#write(key, value, options = {}) ⇒ Object



22
23
24
# File 'lib/lumber/level_util.rb', line 22

def write(key, value, options={})
  @cache[key] = value
end