Versions in this module Expand all Collapse all v1 v1.4.9 Jul 5, 2021 v1.4.5 Jul 5, 2021 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{})