Module: SmartCollection::InstanceMethods
- Defined in:
- lib/smart_collection/instance_methods.rb
Instance Method Summary collapse
- #cache_exists? ⇒ Boolean
- #expire_cache ⇒ Object
- #smart_collection_mixin ⇒ Object
- #update_cache ⇒ Object
Instance Method Details
#cache_exists? ⇒ Boolean
11 12 13 |
# File 'lib/smart_collection/instance_methods.rb', line 11 def cache_exists? smart_collection_mixin.config.cache_manager.cache_exists? self end |
#expire_cache ⇒ Object
7 8 9 |
# File 'lib/smart_collection/instance_methods.rb', line 7 def expire_cache update_column(:cache_expires_at, Time.now - 1) end |
#smart_collection_mixin ⇒ Object
15 16 17 |
# File 'lib/smart_collection/instance_methods.rb', line 15 def smart_collection_mixin self.class.smart_collection_mixin end |
#update_cache ⇒ Object
3 4 5 |
# File 'lib/smart_collection/instance_methods.rb', line 3 def update_cache smart_collection_mixin.config.cache_manager.update self end |