Versions in this module Expand all Collapse all v1 v1.9.0 Oct 3, 2022 v1.7.17 Aug 16, 2022 v1.7.16 Aug 12, 2022 Changes in this version + var CacherTests = []struct{ ... } + func TestBasic(t *testing.T, cache Cacher) + func TestEviction(t *testing.T, cache Cacher) + type Cacher interface + Evict func(key interface{}) + Flush func() + Get func(key interface{}) (interface{}, bool) + Put func(key, value interface{}) + type Deduplicator interface + Deduplicate func(Evictable) Evictable + Flush func() + type Evictable interface + Evict func() + Key func() interface{} + type EvictableLRU struct + Size int + func (c *EvictableLRU) Deduplicate(value Evictable) Evictable + func (c *EvictableLRU) Flush() + type LRU struct + Size int + func (c *LRU) Evict(key interface{}) + func (c *LRU) Flush() + func (c *LRU) Get(key interface{}) (interface{}, bool) + func (c *LRU) Put(key, value interface{})