Module: TypedCache::Instrumenter
- Included in:
- TypedCache::Instrumenters::ActiveSupport, TypedCache::Instrumenters::Monitor, TypedCache::Instrumenters::Null
- Defined in:
- lib/typed_cache/instrumenter.rb
Overview
Instrumenter for cache operations
Instance Method Summary collapse
- #enabled? ⇒ Boolean
- #instrument(event_name, key, **payload) ⇒ Object
-
#namespace ⇒ Object
: -> String.
- #subscribe(event_name, **filters, &block) ⇒ Object
Instance Method Details
#enabled? ⇒ Boolean
24 |
# File 'lib/typed_cache/instrumenter.rb', line 24 def enabled? = config.enabled |
#instrument(event_name, key, **payload) ⇒ Object
9 10 11 |
# File 'lib/typed_cache/instrumenter.rb', line 9 def instrument(event_name, key, **payload, &) raise NotImplementedError, "#{self.class} must implement #instrument" end |
#namespace ⇒ Object
: -> String
19 20 21 |
# File 'lib/typed_cache/instrumenter.rb', line 19 def namespace config.namespace end |
#subscribe(event_name, **filters, &block) ⇒ Object
14 15 16 |
# File 'lib/typed_cache/instrumenter.rb', line 14 def subscribe(event_name, **filters, &block) raise NotImplementedError, "#{self.class} must implement #subscribe" end |