lru

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: BSD-3-Clause Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache added in v0.0.31

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

func NewCache

func NewCache[K comparable, V any](maxItems int) *Cache[K, V]

func (*Cache[K, V]) Delete added in v0.0.31

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

func (*Cache[K, V]) Get added in v0.0.31

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

func (*Cache[K, V]) Set added in v0.0.31

func (c *Cache[K, V]) Set(key K, value V, neverMoveToFront bool)

Jump to

Keyboard shortcuts

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