mem

package
v2.2.6 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Logger is the package-level logger for mem cache operations. By default, it uses the DefaultLogger which wraps slog. You can replace it with your own implementation using SetLogger.

Functions

func NewBucket

func NewBucket[T any](cli model.CacheClient, name string) (model.CacheBucket, error)

func NewCacheDoc

func NewCacheDoc[T any](bucket *bucket[T], key string, val *T) *cacheDoc[T]

func NewClient

func NewClient() model.CacheClient

func SetLogger

func SetLogger(logger model.Logger)

SetLogger sets the package-level logger for all mem cache operations. This should be called once at application startup before creating any cache clients.

Types

This section is empty.

Jump to

Keyboard shortcuts

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