lru

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New[I Item](log *slog.Logger, maxBytes int) *cache[I]

Types

type Cache

type Cache[I Item] interface {
	Get(key string) (I, bool)
	Set(key string, value I)
}

type Item

type Item interface {
	Length() int
}

Jump to

Keyboard shortcuts

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