Versions in this module Expand all Collapse all v1 v1.0.0 Jul 21, 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{}) v1.0.0-alpha Nov 22, 2022