Documentation
¶
Index ¶
- Constants
- type Cacher
- type Redis
- func (r *Redis) Close()
- func (r *Redis) Delete(key string)
- func (r *Redis) Exists(key string) bool
- func (r *Redis) Get(key string, target interface{}) bool
- func (r *Redis) GetBool(key string) bool
- func (r *Redis) GetConn() redis.Conn
- func (r *Redis) GetFloat64(key string) float64
- func (r *Redis) GetInt(key string) int
- func (r *Redis) GetString(key string) string
- func (r *Redis) Set(key string, value interface{})
- func (r *Redis) SetExpired(key string, value interface{}, expire time.Duration)
Constants ¶
View Source
const ( DefaultRedisMaxIdle = 2 DefaultRedisIdleTimeout = 120 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher interface { Get(key string, target interface{}) bool GetString(key string) string GetBool(key string) bool GetFloat64(key string) float64 GetInt(key string) int Exists(key string) bool Delete(key string) // Set 放置值 Set(key string, value interface{}) SetExpired(key string, value interface{}, t time.Duration) Close() }
Cacher 缓存接口
Click to show internal directories.
Click to hide internal directories.