Versions in this module Expand all Collapse all v1 v1.0.1 Aug 11, 2020 Changes in this version + type Cache interface + Cap func() int + Get func(key interface{}) (interface{}, error) + Has func(key interface{}) bool + Len func() int + Remove func(key interface{}) error + Set func(key, val interface{}) error + SetWithExpire func(key, val interface{}, expire time.Duration) error + func NewLRUCache(cap int) Cache + type Item interface + Fresh func(key, val interface{}, expire *time.Time) + IsExpired func() bool + Key func() interface{} + Val func() interface{} + func NewItem(key, val interface{}, expire *time.Time) Item + type ItemAI struct + func (i *ItemAI) Fresh(key, val interface{}, expire *time.Time) + func (i *ItemAI) IsExpired() bool + func (i *ItemAI) Key() interface{} + func (i *ItemAI) SetExpired() + func (i *ItemAI) Val() interface{} + type LRUCache struct + func (c *LRUCache) Cap() int + func (c *LRUCache) Get(key interface{}) (val interface{}, err error) + func (c *LRUCache) Has(key interface{}) bool + func (c *LRUCache) Len() int + func (c *LRUCache) Remove(key interface{}) (err error) + func (c *LRUCache) Set(key, val interface{}) error + func (c *LRUCache) SetWithExpire(key, val interface{}, expire time.Duration) error