Documentation ¶
Index ¶
- Constants
- type CacheHandler
- func (t *CacheHandler) Get(key interface{}) (interface{}, bool)
- func (t *CacheHandler) GetCacheKey(room string, fields []string, params map[string]interface{}) string
- func (t *CacheHandler) GetTTl(key interface{}) (time.Duration, bool)
- func (t *CacheHandler) Set(key, value interface{}, second int64) bool
- func (t *CacheHandler) SetMini(key, value interface{}, second int64) bool
- func (t *CacheHandler) Wait()
Constants ¶
View Source
const BulkSetCache = "BULK_SET_CACHE" // 批量设置
View Source
const CacheGetName = "GET" // 单个获取
* 处理缓存
View Source
const CacheSetName = "SET" // 单个设置
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheHandler ¶
type CacheHandler struct { }
func (*CacheHandler) GetCacheKey ¶
func (t *CacheHandler) GetCacheKey(room string, fields []string, params map[string]interface{}) string
func (*CacheHandler) GetTTl ¶
func (t *CacheHandler) GetTTl(key interface{}) (time.Duration, bool)
GetTTl 设置缓存,毫秒级别
func (*CacheHandler) Set ¶
func (t *CacheHandler) Set(key, value interface{}, second int64) bool
Set 设置缓存
func (*CacheHandler) SetMini ¶
func (t *CacheHandler) SetMini(key, value interface{}, second int64) bool
SetMini 设置缓存,毫秒级别
Click to show internal directories.
Click to hide internal directories.