Versions in this module Expand all Collapse all v0 v0.0.1 Mar 30, 2019 Changes in this version + const ARC + const DefaultExpiration + const DefaultPurgeInterval + const LFU + const LRU + const NoExpiration + const NoPurge + const SIMPLE + func NewBuilder(name string, size int) (*cacheBuilder, error) + func StartPurge(c *Cache, d time.Duration) error + func StopPurge(c *Cache) + type BeforeEvictedFunc func(key, value interface{}) + type Cache interface + CleanExpired func() int + Flush func() + Get func(key interface{}) (interface{}, error) + GetOnlyPresent func(key interface{}) (interface{}, bool) + Has func(key interface{}) bool + Init func() + Keys func() []interface{} + Len func() int + Remove func(key interface{}) bool + Set func(key, value interface{}) + SetWithExpire func(key, value interface{}, duration time.Duration) + type KeyNotFoundError struct + Err error + Key interface{} + Name string + func (e *KeyNotFoundError) Error() string + type LoaderFunc func(key interface{}) (interface{}, error)