Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache interface { ListKey(*ListKeyRequest) (*ListKeyResponse, error) // SetTTL set default ttl SetDefaultTTL(ttl time.Duration) // set cached value with key and expire time. Put(key string, val interface{}) error // set cached value with key and expire time. PutWithTTL(key string, val interface{}, ttl time.Duration) error // get cached value by key. Get(key string, val interface{}) error // delete cached value by key. Delete(key string) error // check if cached value exists or not. IsExist(key string) bool // clear all cache. ClearAll() error // increase cached int value by key, as a counter. Incr(key string) error // decrease cached int value by key, as a counter. Decr(key string) error // close cache Close() error }
Cache provides the interface for cache implementations.
type ListKeyRequest ¶ added in v0.5.1
type ListKeyRequest struct { *request.PageRequest // contains filtered or unexported fields }
ListKeyRequest todo
func NewListKeyRequest ¶ added in v0.5.1
func NewListKeyRequest(pattern string, ps uint, pn uint) *ListKeyRequest
NewListKeyRequest todo
func (*ListKeyRequest) Pattern ¶ added in v0.5.1
func (req *ListKeyRequest) Pattern() string
Pattern tood
type ListKeyResponse ¶ added in v0.5.1
ListKeyResponse todo
func NewListKeyResponse ¶ added in v0.5.1
func NewListKeyResponse(keys []string, total uint64) *ListKeyResponse
NewListKeyResponse todo
Click to show internal directories.
Click to hide internal directories.