Versions in this module Expand all Collapse all v2 v2.0.2 Sep 4, 2026 v2.0.1 Sep 4, 2026 Changes in this version + func CloseCache() + type Cache struct + type DiskCache struct + func (d *DiskCache) Add(key any, value any, lifeSpan time.Duration) + func (d *DiskCache) Clear() bool + func (d *DiskCache) Close() + func (d *DiskCache) Delete(key any) + func (d *DiskCache) Get(key any) (any, bool) + func (d *DiskCache) IsExist(key any) bool + func (d *DiskCache) Range(f func(key, value any) bool) + func (d *DiskCache) Set(key any, value any, duration time.Duration) + func (d *DiskCache) Value(key any) (any, bool) + type ICache interface + Add func(key any, value any, lifeSpan time.Duration) + Clear func() bool + Close func() + Delete func(key any) + Get func(key any) (any, bool) + IsExist func(key any) bool + Range func(f func(key, value any) bool) + Set func(key any, value any, duration time.Duration) + Value func(key any) (any, bool) + func OnDiskCache(cachePath string) ICache + func OnGetCache(cachename string, persistent ...bool) ICache + func OnMemCache(cachename string) ICache + type MemCache struct + func New(cleaningInterval time.Duration) *MemCache + func (c *MemCache) Add(key any, value any, lifeSpan time.Duration) + func (c *MemCache) Clear() bool + func (c *MemCache) IsExist(key any) bool + func (c *MemCache) Value(key any) (any, bool) + func (cache *MemCache) Close() + func (cache *MemCache) Delete(key any) + func (cache *MemCache) Get(key any) (any, bool) + func (cache *MemCache) Range(f func(key, value any) bool) + func (cache *MemCache) Set(key any, value any, duration time.Duration)