Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInMemoryCache ¶
func NewInMemoryCache[T any](defaultExpiry time.Duration, logger logging.Logger, tracerProvider tracing.TracerProvider, metricsProvider metrics.Provider) (cache.Cache[T], error)
NewInMemoryCache builds an in-memory cache. Writes expire after defaultExpiry unless overridden per call with cache.WithExpiry; a non-positive defaultExpiry means entries never expire by default. Expired entries are evicted lazily, on the read that discovers them or when overwritten — there is no background janitor, and the map is not otherwise size-bounded.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.