Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface { Get(key string) interface{} Set(key string, val interface{}, timeout time.Duration) error IsExist(key string) bool Delete(key string) error }
Cache interface
type Memcache ¶
type Memcache struct {
// contains filtered or unexported fields
}
Memcache struct contains *memcache.Client
type Memory ¶
Memory struct contains *memcache.Client
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis redis cache
type RedisOpts ¶
type RedisOpts struct { Debug bool `toml:"debug"` Addr string `toml:"addr" json:"addr"` Password string `toml:"password" json:"password"` Database int `toml:"db" json:"database"` MaxIdle int `toml:"maxIdle" json:"max_idle"` MaxActive int `toml:"maxActive" json:"max_active"` IdleTimeout int32 `toml:"idleTimeout" json:"idle_timeout"` //second }
RedisOpts redis 连接属性
Click to show internal directories.
Click to hide internal directories.