Class: Rack::Cache::MetaStore::Moneta
- Inherits:
-
Rack::Cache::MetaStore
- Object
- Rack::Cache::MetaStore
- Rack::Cache::MetaStore::Moneta
- Extended by:
- Rack::Cache::MonetaResolver
- Defined in:
- lib/rack/cache/moneta.rb
Constant Summary
Constants inherited from Rack::Cache::MetaStore
Instance Method Summary collapse
-
#initialize(cache) ⇒ Moneta
constructor
A new instance of Moneta.
- #purge(key) ⇒ Object
- #read(key) ⇒ Object
- #write(key, entries) ⇒ Object
Methods included from Rack::Cache::MonetaResolver
Constructor Details
#initialize(cache) ⇒ Moneta
Returns a new instance of Moneta.
40 41 42 |
# File 'lib/rack/cache/moneta.rb', line 40 def initialize(cache) @cache = cache end |
Instance Method Details
#purge(key) ⇒ Object
52 53 54 55 |
# File 'lib/rack/cache/moneta.rb', line 52 def purge(key) @cache.delete(key) nil end |
#read(key) ⇒ Object
44 45 46 |
# File 'lib/rack/cache/moneta.rb', line 44 def read(key) @cache[key] || [] end |
#write(key, entries) ⇒ Object
48 49 50 |
# File 'lib/rack/cache/moneta.rb', line 48 def write(key, entries) @cache[key] = entries end |