Versions in this module Expand all Collapse all v1 v1.4.6 Mar 3, 2026 v1.3.0 Feb 26, 2026 v1.2.0 Feb 25, 2026 v1.1.0 Feb 24, 2026 v1.0.0 Feb 23, 2026 Changes in this version + var ErrCacheMiss = errors.New("cache miss") + func IsCacheMiss(err error) bool + type Config struct + Addr string + DB int + DefaultTTL time.Duration + HealthCheckInterval time.Duration + MaxRetries int + MinIdleConns int + Password string + PoolSize int + TLSEnabled bool + func DefaultConfig() Config + type Manager struct + func NewManager(config Config, logger *zap.Logger) (*Manager, error) + func (m *Manager) Close() error + func (m *Manager) Delete(ctx context.Context, keys ...string) error + func (m *Manager) Exists(ctx context.Context, keys ...string) (int64, error) + func (m *Manager) Expire(ctx context.Context, key string, ttl time.Duration) error + func (m *Manager) Get(ctx context.Context, key string) (string, error) + func (m *Manager) GetJSON(ctx context.Context, key string, dest any) error + func (m *Manager) GetStats(ctx context.Context) (*Stats, error) + func (m *Manager) Ping(ctx context.Context) error + func (m *Manager) Set(ctx context.Context, key string, value string, ttl time.Duration) error + func (m *Manager) SetJSON(ctx context.Context, key string, value any, ttl time.Duration) error + type Stats struct + Connections int + Hits uint64 + Keys int64 + MaxMemory int64 + Misses uint64 + UsedMemory int64