Module: Garner::Cache::Binding
- Defined in:
- lib/garner/cache/binding.rb
Instance Method Summary collapse
-
#garner_cache_key ⇒ String
Apply the cache key strategy to this binding.
-
#invalidate_garner_caches ⇒ Boolean
Apply the invalidation strategy to this binding.
-
#invalidation_strategy ⇒ Object
Override this method to use a custom invalidation strategy.
-
#key_strategy ⇒ Object
Override this method to use a custom key strategy.
Instance Method Details
#garner_cache_key ⇒ String
Apply the cache key strategy to this binding.
21 22 23 |
# File 'lib/garner/cache/binding.rb', line 21 def garner_cache_key key_strategy.apply(self) end |
#invalidate_garner_caches ⇒ Boolean
Apply the invalidation strategy to this binding.
35 36 37 38 |
# File 'lib/garner/cache/binding.rb', line 35 def invalidate_garner_caches _invalidate true end |
#invalidation_strategy ⇒ Object
Override this method to use a custom invalidation strategy.
28 29 30 |
# File 'lib/garner/cache/binding.rb', line 28 def invalidation_strategy Garner.config.binding_invalidation_strategy end |
#key_strategy ⇒ Object
Override this method to use a custom key strategy.
14 15 16 |
# File 'lib/garner/cache/binding.rb', line 14 def key_strategy Garner.config.binding_key_strategy end |