Documentation ¶
Overview ¶
Package redis implements a key-value [backend.Cache] client interface to a vanilla redis implementation.
Index ¶
- type RedisCache
- func (r *RedisCache) Delete(ctx context.Context, key string) error
- func (r *RedisCache) Get(ctx context.Context, key string, value interface{}) (bool, error)
- func (r *RedisCache) Incr(ctx context.Context, key string) (int64, error)
- func (r *RedisCache) Mget(ctx context.Context, keys []string, values []interface{}) error
- func (r *RedisCache) Mset(ctx context.Context, keys []string, values []interface{}) error
- func (r *RedisCache) Put(ctx context.Context, key string, value interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
A redis client wrapper that implements the [backend.Cache] interface
func NewRedisCacheClient ¶
func NewRedisCacheClient(ctx context.Context, addr string) (*RedisCache, error)
Instantiates a new redis client to a memcached instance running at `serverAddress`
func (*RedisCache) Delete ¶
func (r *RedisCache) Delete(ctx context.Context, key string) error
Implements the backend.Cache interface
func (*RedisCache) Mget ¶
func (r *RedisCache) Mget(ctx context.Context, keys []string, values []interface{}) error
Implements the backend.Cache interface
Click to show internal directories.
Click to hide internal directories.