Documentation
¶
Index ¶
- func New(ctx context.Context, config *config.Redis) (port.CacheRepository, error)
- type Redis
- func (r *Redis) Close() error
- func (r *Redis) Delete(ctx context.Context, key string) error
- func (r *Redis) DeleteByPrefix(ctx context.Context, prefix string) error
- func (r *Redis) Get(ctx context.Context, key string) ([]byte, error)
- func (r *Redis) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
*
- Redis implements port.CacheRepository interface
- and provides an access to the redis library
func (*Redis) DeleteByPrefix ¶
DeleteByPrefix removes the value from the redis database with the given prefix
Click to show internal directories.
Click to hide internal directories.