Versions in this module Expand all Collapse all v1 v1.0.1 Jun 17, 2021 v1.0.0 Mar 26, 2021 Changes in this version + type EvictCallback func(key interface{}, value interface{}) + type LRU struct + func NewLRU(size int, onEvict EvictCallback) (*LRU, error) + func (c *LRU) Add(key, value interface{}) bool + func (c *LRU) Contains(key interface{}) (ok bool) + func (c *LRU) Get(key interface{}) (value interface{}, ok bool) + func (c *LRU) GetOldest() (interface{}, interface{}, bool) + func (c *LRU) Keys() []interface{} + func (c *LRU) Len() int + func (c *LRU) Peek(key interface{}) (value interface{}, ok bool) + func (c *LRU) Purge() + func (c *LRU) Remove(key interface{}) bool + func (c *LRU) RemoveOldest() (interface{}, interface{}, bool)