Help us shape the future of Go! Take the 2026 Go Developer Survey

lru

package
v0.17.97 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 3 Imported by: 261

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LRU

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

func New

func New[T any](size int) *LRU[T]

func (LRU[T]) Add

func (l LRU[T]) Add(ctx context.Context, key string, value T)

func (LRU[T]) Get

func (l LRU[T]) Get(ctx context.Context, key string) (value T, ok bool)

Jump to

Keyboard shortcuts

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