module Moneta::LMC::Implementation
Public Class Methods
new(options = {})
click to toggle source
# File lib/moneta/lmc.rb, line 29 def initialize(options = {}) @hash = LocalMemCache.new(:filename => options[:filename]) @expiration = Expiration.new(@hash) end
Public Instance Methods
[](key)
click to toggle source
# File lib/moneta/lmc.rb, line 34 def [](key) @hash[key] end
[]=(key, value)
click to toggle source
# File lib/moneta/lmc.rb, line 35 def []=(key, value) @hash[key] = value end
clear()
click to toggle source
# File lib/moneta/lmc.rb, line 36 def clear() @hash.clear end
delete(key)
click to toggle source
# File lib/moneta/lmc.rb, line 42 def delete(key) value = @hash[key] @hash.delete(key) value end
key?(key)
click to toggle source
# File lib/moneta/lmc.rb, line 38 def key?(key) @hash.keys.include?(key) end