Versions in this module Expand all Collapse all v0 v0.1.0 Feb 11, 2026 Changes in this version + type Cache interface + Count func(ctx context.Context, key string) (int64, error) + Del func(ctxt context.Context, keys ...string) (int64, error) + Exists func(ctx context.Context, keys ...string) (int64, error) + Get func(ctxt context.Context, key string) (string, error) + HDel func(ctx context.Context, key string, fields ...string) (int64, error) + HGet func(ctx context.Context, key, field string) (string, error) + HGetAll func(ctx context.Context, key string) (map[string]string, error) + HSet func(ctx context.Context, key string, values ...interface{}) (int64, error) + LPop func(ctx context.Context, key string) (string, error) + Ping func(ctxt context.Context) error + Pop func(ctx context.Context, key string) (string, error) + Push func(ctx context.Context, key string, values ...interface{}) error + RPush func(ctx context.Context, key string, fields ...string) (int64, error) + Set func(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error) + func New(ctxt context.Context, cfg *Properties) (Cache, *national.Message) + type CacheMock struct + func (c CacheMock) Count(ctx context.Context, key string) (int64, error) + func (c CacheMock) Del(ctxt context.Context, keys ...string) (int64, error) + func (c CacheMock) Exists(ctx context.Context, keys ...string) (int64, error) + func (c CacheMock) Get(ctxt context.Context, key string) (string, error) + func (c CacheMock) HDel(ctx context.Context, key string, fields ...string) (int64, error) + func (c CacheMock) HGet(ctx context.Context, key, field string) (string, error) + func (c CacheMock) HGetAll(ctx context.Context, key string) (map[string]string, error) + func (c CacheMock) HSet(ctx context.Context, key string, values ...interface{}) (int64, error) + func (c CacheMock) LPop(ctx context.Context, key string) (string, error) + func (c CacheMock) Ping(ctxt context.Context) error + func (c CacheMock) Pop(ctx context.Context, key string) (string, error) + func (c CacheMock) Push(ctx context.Context, key string, values ...interface{}) error + func (c CacheMock) RPush(ctx context.Context, key string, fields ...string) (int64, error) + func (c CacheMock) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error) + type Credential struct + Password string + Username string + type Pool struct + MaxActiveConnections int + MaxConnectionIdleTime time.Duration + MaxConnectionLifeTime time.Duration + MaxIdleConnections int + MaxRetries int + MinIdleConnections int + Size int + type Properties struct + Addresses lists.List[string] + Credential Credential + Database int + Pool Pool + Type Type + type RedisCache struct + func NewRedis(ctxt context.Context, cfg *Properties) (*RedisCache, *national.Message) + func (r *RedisCache) Count(ctx context.Context, key string) (int64, error) + func (r *RedisCache) Del(ctxt context.Context, keys ...string) (int64, error) + func (r *RedisCache) Exists(ctx context.Context, keys ...string) (int64, error) + func (r *RedisCache) Get(ctxt context.Context, key string) (string, error) + func (r *RedisCache) HDel(ctx context.Context, key string, fields ...string) (int64, error) + func (r *RedisCache) HGet(ctx context.Context, key, field string) (string, error) + func (r *RedisCache) HGetAll(ctx context.Context, key string) (map[string]string, error) + func (r *RedisCache) HSet(ctx context.Context, key string, values ...interface{}) (int64, error) + func (r *RedisCache) InsertHead(ctx context.Context, key string, values ...interface{}) error + func (r *RedisCache) LPop(ctx context.Context, key string) (string, error) + func (r *RedisCache) Lock(ctx context.Context, source, owner string, timeout time.Duration) (bool, error) + func (r *RedisCache) Ping(ctxt context.Context) error + func (r *RedisCache) Pop(ctx context.Context, key string) (string, error) + func (r *RedisCache) Push(ctx context.Context, key string, values ...interface{}) error + func (r *RedisCache) RPush(ctx context.Context, key string, fields ...string) (int64, error) + func (r *RedisCache) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) (string, error) + func (r *RedisCache) Unlock(ctx context.Context, source, owner string) (bool, error) + type Type string + const Redis