Documentation ¶
Index ¶
- func Del(key string) error
- func GetJSON(key string, v interface{}) error
- func GetLock(key string, expired time.Duration) bool
- func GetRedis() (*redis.Client, error)
- func GetString(key string) (string, error)
- func InitCache(cli *redis.Client)
- func InitRedis(group, key string) error
- func InitRedisWithConfig(cfg *redis.Options) (*redis.Client, error)
- func IsExistKey(key string) (bool, time.Duration)
- func Redis() *redis.Client
- func SetJSON(key string, v interface{}, expired time.Duration) error
- func SetString(key, value string, timeout time.Duration) error
- func Std() *redis.Client
- type Cache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRedisWithConfig ¶ added in v0.2.3
func InitRedisWithConfig(cfg *redis.Options) (*redis.Client, error)
InitRedisWithConfig 初始化redis连接
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func CacheInstance ¶
func CacheInstance() *Cache
Click to show internal directories.
Click to hide internal directories.