Class: Primer::Worker::ChangesAgent
- Defined in:
- lib/primer/worker/changes_agent.rb
Instance Method Summary collapse
Methods inherited from Agent
Instance Method Details
#on_message(attribute) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/primer/worker/changes_agent.rb', line 7 def (attribute) cache = Primer.cache cache.keys_for_attribute(attribute).each do |cache_key| block = lambda do cache.invalidate(cache_key) cache.regenerate(cache_key) end cache.throttle ? cache.timeout(cache_key, &block) : block.call end end |