Documentation
¶
Overview ¶
Package freelru is a wrapper around go-freelru.LRU with additional statistics embedded and can be used as a drop in replacement.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LRU ¶
type LRU[K comparable, V any] struct { // contains filtered or unexported fields }
LRU is a wrapper around go-freelru.LRU with additional statistics embedded.
func New ¶
func New[K comparable, V any](capacity uint32, hash lru.HashKeyCallback[K]) (*LRU[K, V], error)
func (*LRU[K, V]) GetAndResetStatistics ¶
func (c *LRU[K, V]) GetAndResetStatistics() Statistics
GetAndResetStatistics returns the internal statistics for this LRU and resets all values to 0.
Click to show internal directories.
Click to hide internal directories.