Versions in this module Expand all Collapse all v1 v1.1.0 Nov 5, 2023 Changes in this version type Cache + func (c *Cache) AllDatawithExpiry() map[string]snaphotData + type CacheOptions struct + EnableSnapshots bool + SnapshotInterval time.Duration v1.0.0 Oct 7, 2023 Changes in this version + const ErrFieldNotFound + const ErrHmsetDataType + const ErrKeyNotFound + const ErrNotHashvalue + type Cache struct + Data map[string]*dataHolder + func (c *Cache) AllData() (map[string]interface{}, int) + func (c *Cache) Del(key string) + func (c *Cache) DeleteExpiredKeys() + func (c *Cache) Exists(key string) bool + func (c *Cache) ExistsNonBlocking(key string) bool + func (c *Cache) Get(key string) (interface{}, error) + func (c *Cache) HGet(key, field string) (interface{}, error) + func (c *Cache) HGetAll(key string) (map[string]interface{}, error) + func (c *Cache) HMset(key string, d interface{}, exp int) error + func (c *Cache) Hset(key, field string, value interface{}, exp int) + func (c *Cache) Set(key string, val interface{}, exp int) + func (c *Cache) Update(key string, val interface{}) error + type CacheFunction interface + AllData func() (map[string]interface{}, int) + Del func(key string) + Exists func(key string) bool + Get func(key string) (interface{}, error) + HGet func(key, field string) (interface{}, error) + HGetAll func(key string) (map[string]interface{}, error) + HMset func(key string, d interface{}, exp int) error + Hset func(key, field string, value interface{}, exp int) + Set func(key string, val interface{}, exp int) + Update func(key string, val interface{}) error + func NewCache() CacheFunction