memory

package
v7.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL