Versions in this module Expand all Collapse all v1 v1.9.1 Mar 9, 2022 Changes in this version + func SetNX(key string, val interface{}, expiration time.Duration) bool type Cache + func (c *Cache) SetNX(key string, value interface{}, expiration time.Duration) bool v1.5.0 Nov 23, 2021 Changes in this version + func Delete(key interface{}) error + func Get(key interface{}) (interface{}, error) + func GetStore() store.StoreInterface + func GetType() string + func GetWithTTL(key interface{}) (interface{}, time.Duration, error) + func InitCache(store store.StoreInterface) + func Set(key interface{}, val interface{}, expiration time.Duration) error + type Cache struct + func New(store store.StoreInterface) *Cache + func (c *Cache) Clear() error + func (c *Cache) Delete(key interface{}) error + func (c *Cache) Get(key interface{}) (interface{}, error) + func (c *Cache) GetStore() store.StoreInterface + func (c *Cache) GetType() string + func (c *Cache) GetWithTTL(key interface{}) (interface{}, time.Duration, error) + func (c *Cache) Set(key interface{}, val interface{}, expiration time.Duration) error + type CacheInterface interface + GetStore func() store.StoreInterface