Module: Cachetastic::Cacheable::ClassOnlyMethods
- Defined in:
- lib/cachetastic/cacheable.rb
Instance Method Summary collapse
-
#delete_from_cache(key) ⇒ Object
Deletes an object from the cache for a given key.
-
#get_from_cache(key, &block) ⇒ Object
Returns an object from the cache for a given key.
-
#set_into_cache(key, value, expiry = 0) ⇒ Object
Sets an object into the cache for a given key.
Instance Method Details
#delete_from_cache(key) ⇒ Object
Deletes an object from the cache for a given key.
192 193 194 |
# File 'lib/cachetastic/cacheable.rb', line 192 def delete_from_cache(key) cache_class.delete(key) end |
#get_from_cache(key, &block) ⇒ Object
Returns an object from the cache for a given key.
187 188 189 |
# File 'lib/cachetastic/cacheable.rb', line 187 def get_from_cache(key, &block) cache_class.get(key, &block) end |
#set_into_cache(key, value, expiry = 0) ⇒ Object
Sets an object into the cache for a given key.
197 198 199 |
# File 'lib/cachetastic/cacheable.rb', line 197 def set_into_cache(key, value, expiry = 0) cache_class.set(key, value, expiry) end |