Class: Rack::Cache::MetaStore::Juno
- Inherits:
-
Rack::Cache::MetaStore
- Object
- Rack::Cache::MetaStore
- Rack::Cache::MetaStore::Juno
- Extended by:
- JunoResolver
- Defined in:
- lib/rack/cache/juno.rb
Constant Summary
Constants inherited from Rack::Cache::MetaStore
Instance Method Summary collapse
-
#initialize(cache) ⇒ Juno
constructor
A new instance of Juno.
- #purge(key) ⇒ Object
- #read(key) ⇒ Object
- #write(key, entries) ⇒ Object
Methods included from JunoResolver
Constructor Details
#initialize(cache) ⇒ Juno
Returns a new instance of Juno.
35 36 37 |
# File 'lib/rack/cache/juno.rb', line 35 def initialize(cache) @cache = cache end |
Instance Method Details
#purge(key) ⇒ Object
47 48 49 50 |
# File 'lib/rack/cache/juno.rb', line 47 def purge(key) @cache.delete(key) nil end |
#read(key) ⇒ Object
39 40 41 |
# File 'lib/rack/cache/juno.rb', line 39 def read(key) @cache[key] || [] end |
#write(key, entries) ⇒ Object
43 44 45 |
# File 'lib/rack/cache/juno.rb', line 43 def write(key, entries) @cache[key] = entries end |