Documentation
¶
Overview ¶
Package cache implements a thread-safe LRU cache with size-based eviction.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a thread-safe LRU cache that evicts the least recently used entries when the total size exceeds the configured maximum.
func (*Cache) Get ¶
Get returns the value for the given key, moving it to the front of the LRU list.
func (*Cache) Set ¶
Set stores a value in the cache for the given key, evicting old entries if necessary.
Click to show internal directories.
Click to hide internal directories.