Versions in this module Expand all Collapse all v1 v1.0.5 Sep 5, 2025 Changes in this version + func IsCacheMissErr(err error) bool + type GenericCache struct + func NewGenericCache(cacheKey string, c *cache.Cache[[]byte]) *GenericCache + func (c *GenericCache) Clear(ctx context.Context) error + func (c *GenericCache) Delete(ctx context.Context, key string) error + func (c *GenericCache) Get(ctx context.Context, key string, target any) error + func (c *GenericCache) Set(ctx context.Context, key string, val any) error v1.0.4 Apr 27, 2025 Changes in this version + func NewMemCache[T any]() *cache.Cache[T] + func NewRedisCache[T any]() *cache.Cache[T] + func SetRedis(redisOpt RedisOptions) + type Cache struct + func New[V any](c *cache.Cache[[]byte]) *Cache[V] + func (c *Cache[T]) Clear(ctx context.Context) error + func (c *Cache[T]) Delete(ctx context.Context, key string) error + func (c *Cache[T]) Get(ctx context.Context, key string) (*T, error) + func (c *Cache[T]) Set(ctx context.Context, key string, val T) error + type CacheOptions struct + type MultiKeyCache struct + func NewMultiKeyCache[V MultiKeyObject](c cache.Cache[V]) *MultiKeyCache[V] + func (m *MultiKeyCache[V]) Delete(ctx context.Context, key string) error + func (m *MultiKeyCache[V]) Get(ctx context.Context, key string) (V, error) + func (m *MultiKeyCache[V]) Set(ctx context.Context, value V) error + type MultiKeyObject interface + GetKeys func() []string + type RedisOptions struct + Addr string + DB int + Password string + TLS *TLS + Username string + func (o *RedisOptions) GetGoRedisOptions() *goredis.Options + type TLS struct + CaPath string + CertPath string + KeyPath string + func (t *TLS) GetTLSConfig() (*tls.Config, error)