Versions in this module Expand all Collapse all v0 v0.1.7 Oct 30, 2026 v0.1.6 Oct 27, 2026 Changes in this version + type LRU struct + func NewLRU[K comparable, V any](capacity int, onEvict func(K, V)) *LRU[K, V] + func NewWeightedLRU[K comparable, V any](capacity int, maxWeight int64, onEvict func(K, V), canEvict ...func(K, V) bool) *LRU[K, V] + func (c *LRU[K, V]) Add(key K, value V) + func (c *LRU[K, V]) AddWeighted(key K, value V, weight int64) + func (c *LRU[K, V]) Get(key K) (V, bool) + func (c *LRU[K, V]) Len() int + func (c *LRU[K, V]) Trim() + func (c *LRU[K, V]) Values() []V + func (c *LRU[K, V]) Weight() int64