Documentation ¶
Index ¶
- func Decode(data []byte, i interface{}) error
- func Encode(i interface{}) ([]byte, error)
- type Cache
- type CacheMapObj
- type CacheObj
- type ComCacheObj
- func (t *ComCacheObj) DecodePipe(obj CacheObj) error
- func (s *ComCacheObj) GetError() error
- func (s *ComCacheObj) GetExpiredTime() time.Duration
- func (s *ComCacheObj) GetStringCmd() (*redis.StringCmd, error)
- func (s *ComCacheObj) HasError() bool
- func (s *ComCacheObj) SetExpiredTime(d time.Duration)
- func (s *ComCacheObj) SetStringCmd(sc *redis.StringCmd)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache interface { SaveObjs(exp time.Duration, docs ...CacheObj) error SaveObj(i CacheObj, exp time.Duration) error GetObj(key string, i CacheObj) error GetObjs(keys []string, d CacheObj) (objs []CacheObj, err error) SaveObjHash(i CacheMapObj, exp time.Duration) error GetObjHash(key string, i CacheMapObj) error }
func NewRedisCache ¶
func NewRedisCache(clt conn.RedisClient) Cache
type CacheMapObj ¶
type ComCacheObj ¶
func (*ComCacheObj) DecodePipe ¶
func (t *ComCacheObj) DecodePipe(obj CacheObj) error
func (*ComCacheObj) GetError ¶
func (s *ComCacheObj) GetError() error
func (*ComCacheObj) GetExpiredTime ¶ added in v1.3.0
func (s *ComCacheObj) GetExpiredTime() time.Duration
func (*ComCacheObj) GetStringCmd ¶
func (s *ComCacheObj) GetStringCmd() (*redis.StringCmd, error)
func (*ComCacheObj) HasError ¶
func (s *ComCacheObj) HasError() bool
func (*ComCacheObj) SetExpiredTime ¶ added in v1.3.0
func (s *ComCacheObj) SetExpiredTime(d time.Duration)
func (*ComCacheObj) SetStringCmd ¶
func (s *ComCacheObj) SetStringCmd(sc *redis.StringCmd)
Click to show internal directories.
Click to hide internal directories.