Class: ActionDispatch::RailsMetaStore
- Inherits:
- 
      Rack::Cache::MetaStore
      
        - Object
- Rack::Cache::MetaStore
- ActionDispatch::RailsMetaStore
 
- Defined in:
- actionpack/lib/action_dispatch/http/rack_cache.rb
Class Method Summary collapse
Instance Method Summary collapse
- 
  
    
      #initialize(store = Rails.cache)  ⇒ RailsMetaStore 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of RailsMetaStore. 
- #read(key) ⇒ Object
- #write(key, value) ⇒ Object
Constructor Details
#initialize(store = Rails.cache) ⇒ RailsMetaStore
Returns a new instance of RailsMetaStore.
| 17 18 19 | # File 'actionpack/lib/action_dispatch/http/rack_cache.rb', line 17 def initialize(store = Rails.cache) @store = store end | 
Class Method Details
.resolve(uri) ⇒ Object
| 13 14 15 | # File 'actionpack/lib/action_dispatch/http/rack_cache.rb', line 13 def self.resolve(uri) new end | 
Instance Method Details
#read(key) ⇒ Object
| 21 22 23 24 25 26 27 | # File 'actionpack/lib/action_dispatch/http/rack_cache.rb', line 21 def read(key) if data = @store.read(key) Marshal.load(data) else [] end end | 
#write(key, value) ⇒ Object
| 29 30 31 | # File 'actionpack/lib/action_dispatch/http/rack_cache.rb', line 29 def write(key, value) @store.write(key, Marshal.dump(value)) end |