Versions in this module Expand all Collapse all v0 v0.1.1 Oct 16, 2020 v0.1.0 Aug 27, 2020 Changes in this version + type Cache struct + func New(config CtorConfig) *Cache + func (c *Cache) Capacity() int + func (c *Cache) Contains(key KeyType) bool + func (c *Cache) Get(key KeyType) (ValueType, bool) + func (c *Cache) Len() int + func (c *Cache) Purge() + func (c *Cache) Query(key KeyType) (value ValueType, ok bool) + func (c *Cache) Remove(key KeyType) bool + func (c *Cache) Set(key KeyType, value ValueType) (evicted bool) + type CtorConfig struct + AllocFunc ValueAllocationFunc + Capacity int + type KeyType = interface + type ValueAllocationFunc func(key KeyType) (value ValueType, ok bool) + type ValueType = interface