Documentation ¶
Index ¶
- type RedisCacher
- func (c *RedisCacher) Bytes(ctx context.Context, key string) (bytes []byte, err error)
- func (c *RedisCacher) BytesMany(ctx context.Context, keys ...string) (map[string][]byte, error)
- func (c *RedisCacher) Close() (err error)
- func (c *RedisCacher) Delete(ctx context.Context, key string) (err error)
- func (c *RedisCacher) DeleteMany(ctx context.Context, keys ...string) (err error)
- func (c *RedisCacher) Exists(ctx context.Context, key string) (has bool, err error)
- func (c *RedisCacher) Instance() redis.UniversalClient
- func (c *RedisCacher) Set(ctx context.Context, key string, bytes []byte, duration time.Duration) (err error)
- func (c *RedisCacher) SetMany(ctx context.Context, items map[string][]byte) (err error)
- func (c *RedisCacher) SetManyExp(ctx context.Context, items map[string][]byte, duration time.Duration) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisCacher ¶
type RedisCacher struct {
// contains filtered or unexported fields
}
func NewRedisCacher ¶
func NewRedisCacher(client redis.UniversalClient) *RedisCacher
func (*RedisCacher) Delete ¶
func (c *RedisCacher) Delete(ctx context.Context, key string) (err error)
Delete implements cache.Cacher
func (*RedisCacher) DeleteMany ¶
func (c *RedisCacher) DeleteMany(ctx context.Context, keys ...string) (err error)
func (*RedisCacher) Instance ¶
func (c *RedisCacher) Instance() redis.UniversalClient
Instance returns the underlying cache interface.
func (*RedisCacher) Set ¶
func (c *RedisCacher) Set( ctx context.Context, key string, bytes []byte, duration time.Duration, ) (err error)
Set implements cache.Cacher
func (*RedisCacher) SetManyExp ¶
func (c *RedisCacher) SetManyExp( ctx context.Context, items map[string][]byte, duration time.Duration, ) (err error)
SetManyExp implements cache.Cacher
Click to show internal directories.
Click to hide internal directories.