Documentation ¶
Index ¶
- Variables
- type Cache
- func (c Cache) Delete(keys ...interface{}) (bool, error)
- func (c Cache) Exist(name string) (bool, error)
- func (c Cache) Expire(name string, newSecondsLifeTime int64) error
- func (c Cache) Get(name string) ([]byte, error)
- func (c Cache) HExists(name, field string) (bool, error)
- func (c Cache) HGet(name, field string) (value []byte, err error)
- func (c Cache) HLen(name string) (int, error)
- func (c Cache) HMSet(name string, obj interface{}) (err error)
- func (c Cache) HMget(name string, fields ...string) ([]interface{}, error)
- func (c Cache) HSet(name string, key string, v []byte) (err error)
- func (c Cache) Hdel(name, key string) (bool, error)
- func (c Cache) ScardInt64s(name string) (int64, error)
- func (c Cache) Set(name string, v []byte) error
- func (c Cache) Smembers(name string) (byt []byte, err error)
- func (c Cache) StrLen(name string) (int, error)
- func (c Cache) StringIncr(name string) (int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DEFAULT = time.Duration(0) // 过期时间 不设置 FOREVER = time.Duration(-1) // 过期时间不设置 )
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶
返回cache 对象, 在多个工具之间建立一个 中间初始化的时候使用
Click to show internal directories.
Click to hide internal directories.