Module: SmartCollection::Mixin::InstanceMethods
- Defined in:
- lib/smart_collection/mixin.rb
Instance Method Summary collapse
- #cache_exists? ⇒ Boolean
- #expire_cache ⇒ Object
- #smart_collection_mixin ⇒ Object
- #update_cache ⇒ Object
Instance Method Details
#cache_exists? ⇒ Boolean
12 13 14 |
# File 'lib/smart_collection/mixin.rb', line 12 def cache_exists? smart_collection_mixin.config.cache_manager.cache_exists? self end |
#expire_cache ⇒ Object
8 9 10 |
# File 'lib/smart_collection/mixin.rb', line 8 def expire_cache update_column(:cache_expires_at, nil) end |
#smart_collection_mixin ⇒ Object
16 17 18 |
# File 'lib/smart_collection/mixin.rb', line 16 def smart_collection_mixin self.class.smart_collection_mixin end |
#update_cache ⇒ Object
4 5 6 |
# File 'lib/smart_collection/mixin.rb', line 4 def update_cache smart_collection_mixin.config.cache_manager.update self end |