cache

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func New

func New[K, V any](kind string, size uint, attributes ...attribute.KeyValue) *Cache[K, V]

func (*Cache[K, V]) Get

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

func (*Cache[K, V]) Has

func (c *Cache[K, V]) Has(k K) bool

func (*Cache[K, V]) Purge

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

func (*Cache[K, V]) Remove

func (c *Cache[K, V]) Remove(k K) bool

func (*Cache[K, V]) Set

func (c *Cache[K, V]) Set(k K, v V)

func (*Cache[K, V]) SetWithExpire

func (c *Cache[K, V]) SetWithExpire(k K, v V, expiry time.Duration)

Jump to

Keyboard shortcuts

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