Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ICache ¶
type ICache interface { ListKey(*ListKeyRequest) (*ListKeyResponse, error) //SetDefaultTTL 设置默认TTL时间戳 SetDefaultTTL(ttl time.Duration) //Put set cached value with key and expire time. Put(key string, val interface{}) error //PutWithTTL set cached value with key and expire time. PutWithTTL(key string, val interface{}, ttl time.Duration) error //Get 返回缓存中Key指定的Value Get(key string, val interface{}) error //Delete 删除缓冲区Key指定的Value. Delete(key string) error //IsExist 检测指定Key的Value再缓冲区中是否存在. IsExist(key string) bool //Clear 清除所有缓存. Clear() error //Incr 按键增加缓存的int值,作为计数器. Incr(key string) error //Decr 按键减少缓存的int值,作为计数器. Decr(key string) error //Close 关闭缓存. Close() error //WithContext 设置上下文 WithContext(ctx context.Context) ICache }
ICache provides the interface for cache implementations.
type ListKeyRequest ¶
type ListKeyRequest struct { *request.PageRequest // contains filtered or unexported fields }
ListKeyRequest ...
type ListKeyResponse ¶
ListKeyResponse ...
func NewListKeyResponse ¶
func NewListKeyResponse(keys []string, total uint64) *ListKeyResponse
NewListKeyResponse 实例化ListKeyResponse
Click to show internal directories.
Click to hide internal directories.