class Faraday::HttpCache::MemoryStore
@private A Hash based store to be used by strategies when a ‘store` is not provided for the middleware setup.
Public Class Methods
new()
click to toggle source
# File lib/faraday/http_cache/memory_store.rb, line 9 def initialize @cache = {} end
Public Instance Methods
delete(key)
click to toggle source
# File lib/faraday/http_cache/memory_store.rb, line 17 def delete(key) @cache.delete(key) end
read(key)
click to toggle source
# File lib/faraday/http_cache/memory_store.rb, line 13 def read(key) @cache[key] end
write(key, value)
click to toggle source
# File lib/faraday/http_cache/memory_store.rb, line 21 def write(key, value) @cache[key] = value end