Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[Key comparable, Value any] interface { Add(key Key, value Value) Get(key Key) (value Value, ok bool) Remove(key Key) (value Value, ok bool) RemoveOldest() (key Key, value Value, ok bool) GetOldest() (key Key, value Value, ok bool) ApplyRO(f func(Cache[Key, Value])) ApplyRW(f func(Cache[Key, Value])) Len() int Container() (interface{}, error) Clear() }
Directories ¶
Path | Synopsis |
---|---|
Package lru implements an LRU cache.
|
Package lru implements an LRU cache. |
Click to show internal directories.
Click to hide internal directories.