Versions in this module Expand all Collapse all v2 v2.0.1 Sep 19, 2019 v2.0.0 Sep 18, 2019 Changes in this version + const DefaultExpiration + const NoExpiration + type Cache struct + func New(defaultExpiration, cleanupInterval time.Duration) *Cache + func NewFrom(defaultExpiration, cleanupInterval time.Duration, items map[interface{}]Item) *Cache + func (c *Cache) Count() int + func (c *Cache) Delete(key interface{}) error + func (c *Cache) DeleteExpired() + func (c *Cache) Flush() + func (c *Cache) Get(key interface{}) (interface{}, bool) + func (c *Cache) Set(key interface{}, value interface{}, duration time.Duration) + type Item struct + Created time.Time + Expiration int64 + Value interface{} Other modules containing this package github.com/efureev/cache