Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EvictCallback ¶
type GenericLRU ¶
func NewGenericLRU ¶
func NewGenericLRU[K any, V any](sz int, evict EvictCallback[K, V]) (*GenericLRU[K, V], error)
func (*GenericLRU[K, V]) Add ¶
func (l *GenericLRU[K, V]) Add(k K, v *V) (evicted bool)
func (*GenericLRU[K, V]) Get ¶
func (l *GenericLRU[K, V]) Get(k K) (*V, bool)
func (*GenericLRU[K, V]) Keys ¶
func (l *GenericLRU[K, V]) Keys() (keys []K)
func (*GenericLRU[K, V]) Len ¶
func (l *GenericLRU[K, V]) Len() int
func (*GenericLRU[K, V]) Remove ¶
func (l *GenericLRU[K, V]) Remove(k K) (present bool)
Click to show internal directories.
Click to hide internal directories.