Class: CacheEntry
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CacheEntry
- Defined in:
- lib/active_record/cache_entry.rb
Instance Method Summary collapse
Instance Method Details
#expires_in ⇒ Object
9 10 11 |
# File 'lib/active_record/cache_entry.rb', line 9 def expires_in expires_at ? expires_at - created_at : nil end |
#to_cache_entry ⇒ Object
13 14 15 |
# File 'lib/active_record/cache_entry.rb', line 13 def to_cache_entry ActiveSupport::Cache::Entry.create(value, created_at, :expires_in => expires_in, :compressed => is_compressed) end |