Method: Readthis::Cache#read
- Defined in:
- lib/readthis/cache.rb
#read(key, options = {}) ⇒ Object
Fetches data from the cache, using the given key. If there is data in the cache with the given key, then that data is returned. Otherwise, nil is returned.
78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/readthis/cache.rb', line 78 def read(key, = {}) = () invoke(:read, key) do |store| key = namespaced_key(key, ) refresh_entity(key, store, ) entity.load(store.get(key)) end end |