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.
26 27 28 |
# File 'lib/garner/cache/binding.rb', line 26 def garner_cache_key key_strategy.apply(self) end |
#invalidate_garner_caches ⇒ Boolean
Apply the invalidation strategy to this binding.
40 41 42 43 |
# File 'lib/garner/cache/binding.rb', line 40 def invalidate_garner_caches invalidation_strategy.apply(self) true end |
#invalidation_strategy ⇒ Object
Override this method to use a custom invalidation strategy.
33 34 35 |
# File 'lib/garner/cache/binding.rb', line 33 def invalidation_strategy Garner.config.binding_invalidation_strategy end |
#key_strategy ⇒ Object
Override this method to use a custom key strategy.
19 20 21 |
# File 'lib/garner/cache/binding.rb', line 19 def key_strategy Garner.config.binding_key_strategy end |