lru

package
v0.0.0-...-4056b1e Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyType

type KeyType interface {
	~int | ~uint | ~string | ~float32 | ~float64
}

type LRU

type LRU[T KeyType] struct {
	// contains filtered or unexported fields
}

func New

func New[T KeyType](cap int) *LRU[T]

func (*LRU[T]) Del

func (c *LRU[T]) Del(key T)

func (*LRU[T]) Get

func (c *LRU[T]) Get(key T) (interface{}, bool)

func (*LRU[T]) Set

func (c *LRU[T]) Set(key T, value interface{})

Jump to

Keyboard shortcuts

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