Versions in this module Expand all Collapse all v1 v1.0.0 Nov 24, 2023 Changes in this version + type Cache interface + Delete func(ctx context.Context, key string) error + Get func(ctx context.Context, key string) (string, error) + GetStruct func(ctx context.Context, key string, targetRef interface{}) (interface{}, error) + Set func(ctx context.Context, key string, value string, expiration time.Duration) error + SetStruct func(ctx context.Context, key string, value interface{}, expiration time.Duration) error + func NewClient(options Options) Cache + func NewInMemory() Cache + type Connection struct + Client *redis.Client + Options Options + func (c *Connection) Delete(ctx context.Context, key string) error + func (c *Connection) Get(ctx context.Context, key string) (string, error) + func (c *Connection) GetStruct(ctx context.Context, key string, target interface{}) (interface{}, error) + func (c *Connection) Set(ctx context.Context, key string, value string, expiration time.Duration) error + func (c *Connection) SetStruct(ctx context.Context, key string, value interface{}, expiration time.Duration) error + func (connection *Connection) Ping(ctx context.Context) error + type Options struct + Address string + DB int + DefaultDurationInSeconds int + Password string + func DefaultOptions() Options + func (opt *Options) GetDefaultDuration() time.Duration