Documentation
¶
Index ¶
- type Adapter
- func (a *Adapter) Client() *redis.Client
- func (a *Adapter) Close() error
- func (a *Adapter) Decr(ctx context.Context, key string) (int64, error)
- func (a *Adapter) Delete(ctx context.Context, keys ...string) error
- func (a *Adapter) Expire(ctx context.Context, key string, expiration time.Duration) error
- func (a *Adapter) Get(ctx context.Context, key string) ([]byte, error)
- func (a *Adapter) GetTTL(ctx context.Context, key string) (time.Duration, error)
- func (a *Adapter) Incr(ctx context.Context, key string) (int64, error)
- func (a *Adapter) MGet(ctx context.Context, keys ...string) ([]interface{}, error)
- func (a *Adapter) Set(ctx context.Context, key string, value []byte, expiration time.Duration) error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
func (*Adapter) Decr ¶
Decr implement the Decr method of the cachemanager.CacheClient interface for Redis.
func (*Adapter) Delete ¶
Delete implement the Delete method of the cachemanager.CacheClient interface for Redis.
func (*Adapter) Expire ¶
Expire implement the Expire method of the cachemanager.CacheClient interface for Redis.
func (*Adapter) Get ¶
Get implement the Get method of the cachemanager.CacheClient interface for Redis. It translates redis.Nil error into cachemanager.ErrKeyNotFound.
func (*Adapter) GetTTL ¶
GetTTL implement the GetTTL method of the cachemanager.CacheClient interface for Redis. It translates Redis's TTL return values (-1 for persistent, -2 for not found) into the generic time.Duration and cachemanager.ErrKeyNotFound.
func (*Adapter) Incr ¶
Incr implement the Incr method of the cachemanager.CacheClient interface for Redis.