Module: CacheCow::Cacheable::InstanceMethods

Defined in:
lib/cache_cow/cacheable.rb

Instance Method Summary collapse

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, options = {})
  self.class.expire_cache cache_id(key), options
end

#fetch_cache(key = nil, options = {}, &block) ⇒ Object



47
48
49
# File 'lib/cache_cow/cacheable.rb', line 47

def fetch_cache(key = nil, options = {}, &block)
  self.class.fetch_cache cache_id(key), options, &block
end

#read_cache(key = nil, options = {}) ⇒ Object



55
56
57
# File 'lib/cache_cow/cacheable.rb', line 55

def read_cache(key = nil, options = {})
  self.class.read_cache cache_id(key), options
end

#write_cache(key = nil, options = {}) ⇒ Object



51
52
53
# File 'lib/cache_cow/cacheable.rb', line 51

def write_cache(key = nil, options = {})
  self.class.write_cache cache_id(key), options
end