Versions in this module Expand all Collapse all v0 v0.5.0 Nov 19, 2026 Changes in this version + var ErrClientRequired = errors.New("cache: redis client is required") + var ErrNotFound = errors.New("cache: key not found") + var ErrWriteFailed = errors.New("cache: write to redis failed") + func GetOrSet[T any](c *Cache, ctx context.Context, key string, ttl time.Duration, ...) error + type Cache struct + func New(client redis.UniversalClient) (*Cache, error) + func (c *Cache) Delete(ctx context.Context, key string) error + func (c *Cache) Get(ctx context.Context, key string, dst any) error + func (c *Cache) Set(ctx context.Context, key string, value any, ttl time.Duration) error