cache_memory

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: GPL-2.0, MIT Imports: 6 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