Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cacher ¶
type Cacher interface { Set(ctx context.Context, key, value string, ttl time.Duration) error Get(ctx context.Context, key string) (string, error) Delete(ctx context.Context, key string) error }
Cacher interfaces to a caching server such as redis/memcached etc.
func NewRedisCache ¶
NewRedisCache provides a redis backed cacher
type RedisCache ¶
type RedisCache struct {
// contains filtered or unexported fields
}
RedisCache basic redis backend driver
func (*RedisCache) Delete ¶
func (rc *RedisCache) Delete(ctx context.Context, key string) error
Delete removes a value by key
Source Files ¶
Click to show internal directories.
Click to hide internal directories.