Documentation
¶
Index ¶
- Variables
- type Cache
- type CacheData
- type RedisClient
- func (m *RedisClient) Del(keys ...string) *redis.IntCmd
- func (m *RedisClient) Get(key string) *redis.StringCmd
- func (m *RedisClient) Incr(key string) *redis.IntCmd
- func (m *RedisClient) Set(key string, value interface{}, expiration time.Duration) *redis.StatusCmd
- func (m *RedisClient) SetNX(key string, value interface{}, expiration time.Duration) *redis.BoolCmd
Constants ¶
This section is empty.
Variables ¶
View Source
var RedisNil = fmt.Sprintf("redis: nil")
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
采用json进行序列化的的cache
func NewCommonCache ¶
redis 地址列表,key前缀,过期时间
func NewCoreCache ¶
type RedisClient ¶
type RedisClient struct {
// contains filtered or unexported fields
}
func NewCommonRedis ¶
func NewCommonRedis(serverName string, poolSize int) (*RedisClient, error)
func NewCoreRedis ¶
func NewCoreRedis(serverName string, poolSize int) (*RedisClient, error)
Click to show internal directories.
Click to hide internal directories.