Module: TypedCache::Instrumenters
- Extended by:
- Forwardable
- Defined in:
- lib/typed_cache/instrumenters.rb,
lib/typed_cache/instrumenters/null.rb,
lib/typed_cache/instrumenters/mixins.rb,
lib/typed_cache/instrumenters/monitor.rb,
lib/typed_cache/instrumenters/active_support.rb,
lib/typed_cache/instrumenters/mixins/namespaced_singleton.rb
Defined Under Namespace
Modules: Mixins Classes: ActiveSupport, Monitor, Null
Constant Summary collapse
- REGISTRY =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Registry mapping symbols to instrumenter classes. We can’t reuse the generic Registry class directly because many instrumenters mix in ‘Singleton`, making `.new` inaccessible. Instead we implement a thin facade that returns either the singleton instance (preferred) or a fresh instance.
Registry.new('instrumenter', { dry: Monitor, rails: ActiveSupport, default: Null, null: Null, })
Class Method Summary collapse
- .registry ⇒ Object private
- .resolve(name, namespace: TypedCache.config.instrumentation.namespace, **options) ⇒ Object
Class Method Details
.registry ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
29 |
# File 'lib/typed_cache/instrumenters.rb', line 29 def registry = REGISTRY |
.resolve(name, namespace: TypedCache.config.instrumentation.namespace, **options) ⇒ Object
32 33 34 |
# File 'lib/typed_cache/instrumenters.rb', line 32 def resolve(name, namespace: TypedCache.config.instrumentation.namespace, **) registry.resolve(name, namespace: namespace, **) end |