Versions in this module Expand all Collapse all v2 v2.0.1 Nov 20, 2024 Changes in this version + type Cache interface + Clear func() + Delete func(key interface{}) + Get func(key interface{}) (interface{}, bool) + Put func(key interface{}, value interface{}) + ToMap func() map[interface{}]interface{} + type LRUCache struct + func NewLRUCache(capacity int) (c *LRUCache, err error) + func (c *LRUCache) Clear() + func (c *LRUCache) Delete(key interface{}) + func (c *LRUCache) Get(key interface{}) (value interface{}, ok bool) + func (c *LRUCache) Put(key interface{}, value interface{}) + func (c *LRUCache) ToMap() map[interface{}]interface{} + type MapCache struct + func NewMapCache() *MapCache + func (c *MapCache) Clear() + func (c *MapCache) Delete(key interface{}) + func (c *MapCache) Get(key interface{}) (value interface{}, ok bool) + func (c *MapCache) Put(key interface{}, value interface{}) + func (c *MapCache) ToMap() map[interface{}]interface{}