Versions in this module Expand all Collapse all v0 v0.1.0 Jan 6, 2021 Changes in this version + var ErrNoResult = errors.New("cache return no result") + var ErrObjectNotFound = errors.New("cache object not found") + var RedisConnectTimeout = time.Second * 5 + var RedisReadTimeout = time.Second * 5 + var RedisWriteTimeout = time.Second * 5 + type Cache interface + DeleteObject func(prefix string, x CacheObjector) error + Exit func() error + LoadArray func(prefix string, ownerId int64, pool *sync.Pool) ([]interface{}, error) + LoadObject func(prefix string, value interface{}, x CacheObjector) error + SaveFields func(prefix string, x CacheObjector, fields map[string]interface{}) error + SaveObject func(prefix string, x CacheObjector) error + func NewCache(ctx *cli.Context) Cache + type CacheObjector interface + GetObjID func() int64 + GetStoreIndex func() int64 + type GoRedis struct + func NewGoRedis(ctx *cli.Context) *GoRedis + func (r *GoRedis) DeleteObject(prefix string, x CacheObjector) error + func (r *GoRedis) Exit() error + func (r *GoRedis) LoadArray(prefix string, ownerId int64, pool *sync.Pool) ([]interface{}, error) + func (r *GoRedis) LoadObject(prefix string, value interface{}, x CacheObjector) error + func (r *GoRedis) SaveFields(prefix string, x CacheObjector, fields map[string]interface{}) error + func (r *GoRedis) SaveObject(prefix string, x CacheObjector) error + type Redigo struct + func NewRedigo(ctx *cli.Context) *Redigo + func (r *Redigo) DeleteObject(prefix string, x CacheObjector) error + func (r *Redigo) Exit() error + func (r *Redigo) LoadArray(prefix string, ownerId int64, pool *sync.Pool) ([]interface{}, error) + func (r *Redigo) LoadObject(prefix string, value interface{}, x CacheObjector) error + func (r *Redigo) SaveFields(prefix string, x CacheObjector, fields map[string]interface{}) error + func (r *Redigo) SaveObject(prefix string, x CacheObjector) error