Module: RestrictCache::Cacheable::CacheKey
- Defined in:
- lib/restrict_cache/cacheable.rb
Constant Summary collapse
- ACTIVERECORD =
:active_record_cache- CUSTOM =
:custom_cache- ALL =
[ACTIVERECORD, CUSTOM]
Class Method Summary collapse
Class Method Details
.get(content) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/restrict_cache/cacheable.rb', line 12 def self.get(content) case when defined?(ActiveRecord) && content.class < ActiveRecord::Base ACTIVERECORD else CUSTOM end end |