Module: ActiveRecordCaching::CacheKey::Rails4
- Defined in:
- lib/active_record_caching/cache_key.rb
Instance Method Summary collapse
Instance Method Details
#cache_key ⇒ Object
22 23 24 |
# File 'lib/active_record_caching/cache_key.rb', line 22 def cache_key Digest::MD5.hexdigest(raw_cache_key) end |
#raw_cache_key ⇒ Object
30 31 32 |
# File 'lib/active_record_caching/cache_key.rb', line 30 def raw_cache_key "#{all.to_sql}-#{updated_at.try(:to_i)}-#{all.count}" end |
#updated_at ⇒ Object
26 27 28 |
# File 'lib/active_record_caching/cache_key.rb', line 26 def updated_at all.maximum(:updated_at) end |