Sha256: 0dba8ed921a06901ab4313c2c1c6aea6ec5bbc50c4039433217b5d3fe434b150

Contents?: true

Size: 353 Bytes

Versions: 3

Compression:

Stored size: 353 Bytes

Contents

module CacheAdditions
  def entry(name)
    options = merged_options(nil)
    key = namespaced_key(name, options)
    read_entry(key, options)
  end
  
  # This method reveals when a cache entry has been created.
  #
  def created_at(name)
    Time.at(entry(name).created_at) if entry(name)
  end
end

ActiveSupport::Cache::Store.include(CacheAdditions)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
your_platform-1.0.1 app/models/cache_additions.rb
your_platform-1.0.0 app/models/cache_additions.rb
your_platform-0.0.2 app/models/cache_additions.rb