Versions in this module Expand all Collapse all v0 v0.0.0 Jan 18, 2024 Changes in this version + func NewLRU(config *Config) (interfaces.LRU, error) + type Config struct + MaxSize int64 + OnEvict EvictedCallback + SizeFn SizeFn + type Entry struct + type EvictedCallback func(value interface{}) + type LRU struct + func (c *LRU) Add(key, value interface{}) bool + func (c *LRU) Contains(key interface{}) bool + func (c *LRU) Get(key interface{}) (interface{}, bool) + func (c *LRU) Len() int + func (c *LRU) MaxSize() int64 + func (c *LRU) Metrics() string + func (c *LRU) Peek(key interface{}) (interface{}, bool) + func (c *LRU) Purge() + func (c *LRU) PushBack(key, value interface{}) bool + func (c *LRU) Remove(key interface{}) (present bool) + func (c *LRU) RemoveOldest() (interface{}, bool) + func (c *LRU) Size() int64 + type SizeFn func(value interface{}) int64