Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BigCache ¶ added in v1.0.2
type BigCache struct {
// contains filtered or unexported fields
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * BigCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*BigCache) Get ¶ added in v1.0.2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
type ICache ¶
type ICache interface { Get(key string, dest interface{}) error Set(key string, dest interface{}, second int) error Remove(keys ...string) error }
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * ICache接口 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func NewBigCache ¶ added in v1.0.2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化BigCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func NewRedisCache ¶
func NewRedisCache(ip string, port int, password string, db, timeout int, prefix string, args ...bool) ICache
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化RedisCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
type IPack ¶
type IPack interface { Marshal(dest interface{}) ([]byte, error) Unmarshal(data []byte, dest interface{}) error }
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * ICache接口 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func NewMessagePack ¶
func NewMessagePack() IPack
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化messagePack * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
type LocalCache ¶
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * LocalCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func NewLocalCache ¶
func NewLocalCache(maxLength int, expiration time.Duration) *LocalCache
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 初始化LocalCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*LocalCache) Get ¶
func (s *LocalCache) Get(key string, dest interface{}) error
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*LocalCache) Len ¶
func (s *LocalCache) Len() int
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取缓存长度 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*LocalCache) Remove ¶
func (s *LocalCache) Remove(keys ...string) bool
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 删除数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
type RedisCache ¶
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * RedisCache * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*RedisCache) Get ¶
func (s *RedisCache) Get(key string, dest interface{}) error
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 获取数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
func (*RedisCache) Remove ¶
func (s *RedisCache) Remove(keys ...string) error
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * 删除数据 * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++