Versions in this module Expand all Collapse all v1 v1.1.0 Sep 4, 2023 v1.0.0 Sep 3, 2023 Changes in this version + type Cleanable interface + type EnhanceCache struct + func NewCache(expired time.Duration) *EnhanceCache[string, V] + func NewCacheWithEviction(expired time.Duration, eviction func(key string, value V)) *EnhanceCache[string, V] + func (ec *EnhanceCache[K, V]) Clear() + func (ec *EnhanceCache[K, V]) DecrInt(key string, value any) (current V) + func (ec *EnhanceCache[K, V]) Delete(key string) + func (ec *EnhanceCache[K, V]) Get(key string) (v V, exist bool) + func (ec *EnhanceCache[K, V]) IncrInt(key string, value interface{}) (current V) + func (ec *EnhanceCache[K, V]) LoadOrStore(key string, value V) (V, bool) + func (ec *EnhanceCache[K, V]) Set(key string, value V) + func (ec *EnhanceCache[K, V]) SetWithEviction(evictionFunc func(key string, value V)) + func (ec *EnhanceCache[K, V]) SetWithExpiration(key string, value V, expiration time.Duration) + func (ec *EnhanceCache[K, V]) Size() int + type Item struct + Expiration time.Time + Object any