Module: Philiprehberger::CacheKit::Callbacks
- Included in:
- Store
- Defined in:
- lib/philiprehberger/cache_kit/callbacks.rb
Overview
Eviction callback support for Store.
Instance Method Summary collapse
-
#on_evict {|key, value| ... } ⇒ void
Register a callback invoked when entries are evicted.
Instance Method Details
#on_evict {|key, value| ... } ⇒ void
This method returns an undefined value.
Register a callback invoked when entries are evicted.
11 12 13 |
# File 'lib/philiprehberger/cache_kit/callbacks.rb', line 11 def on_evict(&block) @mutex.synchronize { @evict_callbacks << block } end |