Module: Garner::Strategies::Keys::Key
- Defined in:
- lib/garner/strategies/keys/key_strategy.rb
Overview
Inject a key into the cache key.
Class Method Summary collapse
Class Method Details
.apply(key, context = {}) ⇒ Object
12 13 14 15 16 |
# File 'lib/garner/strategies/keys/key_strategy.rb', line 12 def apply(key, context = {}) key = key ? key.dup : {} key[field] = context[:key] if context && context.has_key?(:key) key end |
.field ⇒ Object
8 9 10 |
# File 'lib/garner/strategies/keys/key_strategy.rb', line 8 def field :key end |