Versions in this module Expand all Collapse all v1 v1.6.2 Mar 26, 2020 v1.6.1 Mar 26, 2020 Changes in this version type Cache + func (cache *Cache) Close() v1.5.0 Jun 17, 2019 Changes in this version + const ItemExpireWithGlobalTTL + const ItemNotExpire + type Cache struct + func NewCache() *Cache + func (cache *Cache) Count() int + func (cache *Cache) Get(key string) (interface{}, bool) + func (cache *Cache) Purge() + func (cache *Cache) Remove(key string) bool + func (cache *Cache) Set(key string, data interface{}) + func (cache *Cache) SetCheckExpirationCallback(callback checkExpireCallback) + func (cache *Cache) SetExpirationCallback(callback expireCallback) + func (cache *Cache) SetNewItemCallback(callback expireCallback) + func (cache *Cache) SetTTL(ttl time.Duration) + func (cache *Cache) SetWithTTL(key string, data interface{}, ttl time.Duration) + func (cache *Cache) SkipTtlExtensionOnHit(value bool)