Module: CacheCow::Cacheable::InstanceMethods
- Defined in:
- lib/cache_cow/cacheable.rb
Instance Method Summary collapse
- #cache_key(key = nil) ⇒ Object
- #expire_cache(key = nil, options = {}) ⇒ Object
- #fetch_cache(key = nil, options = {}, &block) ⇒ Object
- #read_cache(key = nil, options = {}) ⇒ Object
- #write_cache(key = nil, options = {}) ⇒ Object
Instance Method Details
#cache_key(key = nil) ⇒ Object
63 64 65 |
# File 'lib/cache_cow/cacheable.rb', line 63 def cache_key(key = nil) self.class.cache_key cache_id(key) end |
#expire_cache(key = nil, options = {}) ⇒ Object
59 60 61 |
# File 'lib/cache_cow/cacheable.rb', line 59 def expire_cache(key = nil, = {}) self.class.expire_cache cache_id(key), end |
#fetch_cache(key = nil, options = {}, &block) ⇒ Object
47 48 49 |
# File 'lib/cache_cow/cacheable.rb', line 47 def fetch_cache(key = nil, = {}, &block) self.class.fetch_cache cache_id(key), , &block end |
#read_cache(key = nil, options = {}) ⇒ Object
55 56 57 |
# File 'lib/cache_cow/cacheable.rb', line 55 def read_cache(key = nil, = {}) self.class.read_cache cache_id(key), end |
#write_cache(key = nil, options = {}) ⇒ Object
51 52 53 |
# File 'lib/cache_cow/cacheable.rb', line 51 def write_cache(key = nil, = {}) self.class.write_cache cache_id(key), end |