lru

package
v0.9917.56 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 3 Imported by: 0

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