cache

package
v0.0.0-...-4fc17d7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WithExpiration = cache.WithExpiration

Functions

This section is empty.

Types

type AutoInvalidateByAccountCache

type AutoInvalidateByAccountCache struct {
	// contains filtered or unexported fields
}

IN DEVELOPING!

func (AutoInvalidateByAccountCache) Set

func (c AutoInvalidateByAccountCache) Set(operation string, value any, keys ...any)

IN DEVELOPING!

type Cache

type Cache[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewLRUCache

func NewLRUCache[K comparable, V any](size int, metricName string) Cache[K, V]

func (*Cache[K, V]) Delete

func (c *Cache[K, V]) Delete(key K)

func (*Cache[K, V]) Get

func (c *Cache[K, V]) Get(key K) (V, bool)

func (*Cache[K, V]) Keys

func (c *Cache[K, V]) Keys() []K

Keys returns the keys of the cache. the order is relied on algorithms.

func (*Cache[K, V]) Set

func (c *Cache[K, V]) Set(key K, val V, opts ...cache.ItemOption)

Jump to

Keyboard shortcuts

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