cache_memory

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 4 Imported by: 1

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[string, V]
}

func New32

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

func (RistrettoCache[V]) Delete

func (s RistrettoCache[V]) Delete(k string)

func (RistrettoCache[V]) Get

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

func (RistrettoCache[V]) Set

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

func (RistrettoCache[V]) SetWithTTL

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

Jump to

Keyboard shortcuts

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