Documentation ¶
Index ¶
- type Cache
- type LocalCache
- type RedisCache
- func (c *RedisCache) Del(ctx context.Context, key string) error
- func (c *RedisCache) Exist(ctx context.Context, key string) (int64, error)
- func (c *RedisCache) Get(ctx context.Context, key string) (string, error)
- func (c *RedisCache) HGetAll(ctx context.Context, key string) (map[string]string, error)
- func (c *RedisCache) HSet(ctx context.Context, key string, values ...interface{}) error
- func (c *RedisCache) LuaWithReturnBool(ctx context.Context, luaPath string, key []string, args ...interface{}) (bool, error)
- func (c *RedisCache) LuaWithReturnInt(ctx context.Context, luaPath string, key []string, args ...interface{}) (int, error)
- func (c *RedisCache) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalCache ¶
type LocalCache struct {
// contains filtered or unexported fields
}
func NewRankLocalCache ¶
func NewRankLocalCache() *LocalCache
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
func NewRedisCache ¶
func NewRedisCache(cmd redis.Cmdable, expiration time.Duration) RedisCache
func (*RedisCache) HSet ¶
func (c *RedisCache) HSet(ctx context.Context, key string, values ...interface{}) error
func (*RedisCache) LuaWithReturnBool ¶
func (*RedisCache) LuaWithReturnInt ¶
Click to show internal directories.
Click to hide internal directories.