Module: CacheAdditions

Defined in:
app/models/cache_additions.rb

Instance Method Summary collapse

Instance Method Details

#created_at(name) ⇒ Object

This method reveals when a cache entry has been created.



10
11
12
# File 'app/models/cache_additions.rb', line 10

def created_at(name)
  Time.at(entry(name).created_at) if entry(name)
end

#entry(name) ⇒ Object



2
3
4
5
6
# File 'app/models/cache_additions.rb', line 2

def entry(name)
  options = merged_options(nil)
  key = namespaced_key(name, options)
  read_entry(key, options)
end