Versions in this module Expand all Collapse all v0 v0.1.0 May 12, 2026 Changes in this version + type Cache interface + Repopulate func(ctx context.Context, src Store[V], keys []Key) error + func NewInstrumentedCache[V any](inner Cache[V], recorder metrics.Recorder, label string) Cache[V] + type Deduper interface + Close func() error + MarkSeen func(ctx context.Context, eventID string) (firstSeen bool, err error) + type Instrumented struct + func (s *Instrumented[V]) Close() error + func (s *Instrumented[V]) Get(ctx context.Context, k Key) (V, bool, error) + func (s *Instrumented[V]) GetMany(ctx context.Context, ks []Key) ([]V, []bool, error) + func (s *Instrumented[V]) MergeUpdate(ctx context.Context, k Key, delta V, ttl time.Duration) error + type InstrumentedCache struct + func (c *InstrumentedCache[V]) Close() error + func (c *InstrumentedCache[V]) Get(ctx context.Context, k Key) (V, bool, error) + func (c *InstrumentedCache[V]) GetMany(ctx context.Context, ks []Key) ([]V, []bool, error) + func (c *InstrumentedCache[V]) MergeUpdate(ctx context.Context, k Key, delta V, ttl time.Duration) error + func (c *InstrumentedCache[V]) Repopulate(ctx context.Context, src Store[V], keys []Key) error + type Key struct + Bucket int64 + Entity string + type OnMergeFunc func(ctx context.Context, key Key, delta V) error + type OnMergeOption func(*onMergeConfig) + func WithHookErrorPropagation(propagate bool) OnMergeOption + func WithHookLogger(logger *slog.Logger) OnMergeOption + type Store interface + Close func() error + Get func(ctx context.Context, k Key) (val V, ok bool, err error) + GetMany func(ctx context.Context, ks []Key) (vals []V, ok []bool, err error) + MergeUpdate func(ctx context.Context, k Key, delta V, ttl time.Duration) error + func NewInstrumented[V any](inner Store[V], recorder metrics.Recorder, label string) Store[V] + func WithOnMerge[V any](inner Store[V], fn OnMergeFunc[V], opts ...OnMergeOption) Store[V]