cache_memory

package
v0.0.0-...-afa5e5b Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RistrettoCache

type RistrettoCache[V any] struct {
	Cache *ristretto.Cache[uint64, V]
}

func New

func New[V any](max int64) *RistrettoCache[V]

func (RistrettoCache[V]) Delete

func (s RistrettoCache[V]) Delete(k [32]byte)

func (RistrettoCache[V]) Get

func (s RistrettoCache[V]) Get(k [32]byte) (v V, ok bool)

func (RistrettoCache[V]) Set

func (s RistrettoCache[V]) Set(k [32]byte, v V) bool

func (RistrettoCache[V]) SetWithTTL

func (s RistrettoCache[V]) SetWithTTL(k [32]byte, v V, d time.Duration) bool

Jump to

Keyboard shortcuts

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