Versions in this module Expand all Collapse all v0 v0.2.1 Jan 16, 2023 Changes in this version + func NewMultiRedisCache(addr, pass string) (caches map[int]ICache, err error) + type ICache interface + Close func() + Del func(ctx context.Context, key string) error + Exists func(ctx context.Context, key string) (bool, error) + Expire func(ctx context.Context, key string, expire int) error + Get func(ctx context.Context, key string) (string, error) + GetInt func(ctx context.Context, key string) (int, error) + HDel func(ctx context.Context, key string, fields ...string) error + HExists func(ctx context.Context, key, filed string) (bool, error) + HGet func(ctx context.Context, key, field string) (string, error) + HGetAll func(ctx context.Context, key string) (map[string]string, error) + HMGet func(ctx context.Context, key string, fields ...string) ([]interface{}, error) + HMSet func(ctx context.Context, key string, kvs ...interface{}) error + HSet func(ctx context.Context, key string, kv ...interface{}) error + Incr func(ctx context.Context, key string) (int64, error) + Keys func(ctx context.Context, pattern string) ([]string, error) + SAdd func(ctx context.Context, key string, members ...interface{}) error + SCard func(ctx context.Context, key string) (int64, error) + SIsMember func(ctx context.Context, key string, member interface{}) (bool, error) + SMembers func(ctx context.Context, key string) ([]string, error) + SRem func(ctx context.Context, key string, members ...interface{}) error + Set func(ctx context.Context, key string, value interface{}, expire int) error + ZAdd func(ctx context.Context, key string, list map[string]float64) error + ZRangeByScore func(ctx context.Context, key string, min, max string, off, lim int64) ([]string, error) + ZRem func(ctx context.Context, key string, members ...interface{}) error + ZRevRangeByScore func(ctx context.Context, key string, min, max string, off, lim int64) ([]string, error) + func NewRedisCache(cmd redis.Cmdable) ICache + func NewRedisCacheWithParams(addr, pass string, db int) ICache