Class: Juno::Adapters::LocalMemCache
- Defined in:
- lib/juno/adapters/localmemcache.rb
Overview
LocalMemCache backend
Instance Method Summary collapse
- #delete(key, options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ LocalMemCache
constructor
Constructor.
Methods inherited from Memory
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ LocalMemCache
Constructor
Options:
-
:file - Database file
14 15 16 17 |
# File 'lib/juno/adapters/localmemcache.rb', line 14 def initialize( = {}) raise ArgumentError, 'Option :file is required' unless [:file] @memory = ::LocalMemCache.new(:filename => [:file]) end |
Instance Method Details
#delete(key, options = {}) ⇒ Object
19 20 21 22 23 |
# File 'lib/juno/adapters/localmemcache.rb', line 19 def delete(key, = {}) value = load(key, ) @memory.delete(key) value end |