Documentation ¶
Overview ¶
Package lru provides an LRU cache.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[K comparable, V any] struct { // contains filtered or unexported fields }
Cache is an LRU cache.
func New ¶
func New[K comparable, V any](size int) *Cache[K, V]
New returns a new Cache. Size must be positive or it will panic.
Click to show internal directories.
Click to hide internal directories.