Versions in this module Expand all Collapse all v1 v1.1.1 Apr 29, 2024 v1.1.0 Apr 29, 2024 Changes in this version + const KeyPrefix + var ErrEmptyCache = errors.New("cachable: No results found") + func Del(ctx context.Context, key string) + func DelByTag(ctx context.Context, tag string) + func Expire(key string, expire time.Duration) + func Get(ctx context.Context, key string) string + func GetFromFallBack(ctx context.Context, key string) string + func GetKeys(ctx context.Context, tag string) []string + func GetList(ctx context.Context, key string, start, stop int64) ([]string, error) + func Has(key string) bool + func Set(key, value string, expire time.Duration) + func SetUpRedis(db, cluster int) + func SetUpRedisCluster(nodes []string) error + func Tag(tag, key string) bool + type Cache struct + type Cacheable struct + LastUpdated time.Time + func NewCachable(prefix, id string, parentPtr ICacheable) (*Cacheable, error) + func (c *Cacheable) Get(ctx context.Context) error + func (c *Cacheable) GetKey() string + func (c *Cacheable) Set(expire time.Duration) error + type ICacheable interface + Get func() error + GetKey func() string + Set func(expire time.Duration) error + type Tags []string