Method: FatCache.lookup

Defined in:
lib/fat_cache.rb

.lookup(key, options = {}) ⇒ Object



35
36
37
38
39
40
41
42
43
# File 'lib/fat_cache.rb', line 35

def lookup(key, options={})
  options = options.dup
  by      = [*options.delete(:by)]
  using   = [*options.delete(:using)]
  
  fetch_index!(key, by) unless indexed?(key, by)

  indexed_fatcache[key][by][using]
end