Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = store.ErrNotFound
ErrNotFound 表示缓存键不存在或已经过期。
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache interface {
// List 返回当前缓存中的条目及其运行时元数据。
List() ([]Entry, error)
Get(key string) (string, error)
// Incr 原子递增字符串数值键并返回递增后的值。
Incr(key string) (int64, error)
// GetDel 原子读取并删除缓存值。
GetDel(key string) (string, error)
Set(key string, value string, expire time.Duration) error
Del(key string) error
Expire(key string, dur time.Duration) error
Exists(key string) bool
HGetAll(key string) (map[string]string, error)
HGet(key, field string) (string, error)
HSet(key, field, value string) error
HDel(key string, field string) error
HExists(key, field string) error
}
Click to show internal directories.
Click to hide internal directories.