cache_memory

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: CC0-1.0, MIT Imports: 5 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[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