Module: ActiveRecordCaching::CacheKey::Rails3
- Defined in:
- lib/active_record_caching/cache_key.rb
Instance Method Summary collapse
Instance Method Details
#cache_key ⇒ Object
8 9 10 |
# File 'lib/active_record_caching/cache_key.rb', line 8 def cache_key Digest::MD5.hexdigest(raw_cache_key) end |
#raw_cache_key ⇒ Object
16 17 18 |
# File 'lib/active_record_caching/cache_key.rb', line 16 def raw_cache_key "#{scoped.to_sql}-#{updated_at.try(:to_i)}-#{scoped.count}" end |
#updated_at ⇒ Object
12 13 14 |
# File 'lib/active_record_caching/cache_key.rb', line 12 def updated_at scoped.maximum(:updated_at) end |