Class | Rack::Cache::MetaStore::Heap |
In: |
lib/rack/cache/metastore.rb
|
Parent: | MetaStore |
Concrete MetaStore implementation that uses a simple Hash to store request/response pairs on the heap.
# File lib/rack/cache/metastore.rb, line 173 173: def initialize(hash={}) 174: @hash = hash 175: end
# File lib/rack/cache/metastore.rb, line 187 187: def purge(key) 188: @hash.delete(key) 189: nil 190: end
# File lib/rack/cache/metastore.rb, line 177 177: def read(key) 178: @hash.fetch(key, []).collect do |req,res| 179: [req.dup, res.dup] 180: end 181: end