代码拉取完成,页面将自动刷新
package cache
import (
"time"
"gitee.com/carlmax_my/console-core-go/pkg/trace"
)
type Option func(*option)
// type Trace = trace.T
type option struct {
Trace *trace.Trace
Redis *trace.Redis
// add other cache module options
}
func NewOption() *option {
return &option{}
}
type Cache interface {
// i()
Set(key string, value interface{}, ttl time.Duration, options ...Option) error
SetT(key string, value interface{}, ttl time.Duration, trace trace.T) error
Get(key string, options ...Option) (string, error)
GetT(key string, trace trace.T) (string, error)
TTL(key string) (time.Duration, error)
Expire(key string, ttl time.Duration) (bool, error)
ExpireAt(key string, ttl time.Time) (bool, error)
Exists(keys ...string) (bool, error)
CheckGet(key string, options ...Option) (string, error)
CheckGetT(key string, trace trace.T) (string, error)
Del(key string, options ...Option) (int64, error)
DelT(key string, trace trace.T) (int64, error)
GetScanKeys(pattern string) (result []string, err error)
GetSScanKeys(key string, pattern string) (result []string, err error)
GetHScanKeys(key string, pattern string) (result []string, err error)
SMembers(key string) ([]string, error)
SIsMember(key, member string) bool
SAdd(key, member string) error
SRem(key, member string) error
Keys(pattern string) (r []string, err error)
// HMSET KEY_NAME FIELD1 VALUE1 ...FIELD-N VALUE-N
HMSet(key string, values ...interface{}) (bool, error)
HMGet(key string, field ...string) ([]interface{}, error)
Publish(channel string, message interface{}) (int64, error)
Close() error
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。