Class: Moneta::Adapters::LocalMemCache
- Inherits:
-
Moneta::Adapter
- Object
- Moneta::Adapter
- Moneta::Adapters::LocalMemCache
- Includes:
- HashAdapter
- Defined in:
- lib/moneta/adapters/localmemcache.rb
Overview
LocalMemCache backend
Instance Attribute Summary
Attributes included from HashAdapter
Attributes inherited from Moneta::Adapter
Instance Method Summary collapse
-
#delete(key, options = {}) ⇒ Object
Delete the key from the store and return the current value.
- #initialize(options = {}) ⇒ Object constructor
Methods included from HashAdapter
#clear, #fetch_values, #key?, #load, #merge!, #slice, #store, #values_at
Methods inherited from Moneta::Adapter
backend, backend_block, backend_required?
Methods included from Config
Methods included from Defaults
#[], #[]=, #close, #create, #decrement, #each_key, #features, #fetch, #fetch_values, included, #increment, #key?, #merge!, #slice, #supports?, #update, #values_at
Methods included from OptionSupport
#expires, #prefix, #raw, #with
Constructor Details
#initialize(options = {}) ⇒ Object
14 |
# File 'lib/moneta/adapters/localmemcache.rb', line 14 backend { |file:| ::LocalMemCache.new(filename: file) } |
Instance Method Details
#delete(key, options = {}) ⇒ Object
Delete the key from the store and return the current value
17 18 19 20 21 |
# File 'lib/moneta/adapters/localmemcache.rb', line 17 def delete(key, = {}) value = load(key, ) backend.delete(key) value end |