Module: Cachetastic::Cacheable::ClassOnlyMethods
- Defined in:
- lib/gems/cachetastic-2.1.2/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.
187 188 189 |
# File 'lib/gems/cachetastic-2.1.2/lib/cachetastic/cacheable.rb', line 187 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.
182 183 184 |
# File 'lib/gems/cachetastic-2.1.2/lib/cachetastic/cacheable.rb', line 182 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.
192 193 194 |
# File 'lib/gems/cachetastic-2.1.2/lib/cachetastic/cacheable.rb', line 192 def set_into_cache(key, value, expiry = 0) cache_class.set(key, value, expiry) end |