module Mrcr::Cache::Methods

Instance methods

Public Instance Methods

fetch(key, default = nil) click to toggle source

Delegates call to the class-level method

@param [Object] key Hashable object @param [Object] default Default value.

@return [Object] return value or default

# File lib/mrcr/cache.rb, line 83
def fetch(key, default = nil)
  self.class.fetch(key, default)
end
fetch_or_store(key, &block) click to toggle source

Delegates call to the class-level method

@param [Object] key Hashable object @yield An arbitrary block

@return [Object] block's return value

# File lib/mrcr/cache.rb, line 73
def fetch_or_store(key, &block)
  self.class.fetch_or_store(key, &block)
end