Module: TypedCache::Instrumenter

Overview

Instrumenter for cache operations

Instance Method Summary collapse

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


24
# File 'lib/typed_cache/instrumenter.rb', line 24

def enabled? = config.enabled

#instrument(event_name, key, **payload) ⇒ Object

Raises:

  • (NotImplementedError)


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

#namespaceObject

: -> String



19
20
21
# File 'lib/typed_cache/instrumenter.rb', line 19

def namespace
  config.namespace
end

#subscribe(event_name, **filters, &block) ⇒ Object

Raises:

  • (NotImplementedError)


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