Versions in this module Expand all Collapse all v0 v0.6.1 Jan 19, 2026 Changes in this version + func GetTyped[T any](c Cache, key string) (T, error) + func MustGet[T any](c Cache, key string) T + type BadgerCache struct + Conn *badger.DB + Prefix string + func (b *BadgerCache) EmptyByMatch(str string) error + func (b *BadgerCache) Flush() error + func (b *BadgerCache) Forget(str string) error + func (b *BadgerCache) Get(str string) (interface{}, error) + func (b *BadgerCache) Has(str string) (bool, error) + func (b *BadgerCache) Set(str string, value interface{}, ttl ...int) error + type Cache interface + EmptyByMatch func(string) error + Flush func() error + Forget func(string) error + Get func(string) (interface{}, error) + Has func(string) (bool, error) + Set func(string, interface{}, ...int) error + type Entry map[string]interface + type RedisCache struct + Conn *redis.Pool + Prefix string + func (c *RedisCache) EmptyByMatch(str string) error + func (c *RedisCache) Flush() error + func (c *RedisCache) Forget(str string) error + func (c *RedisCache) Get(str string) (interface{}, error) + func (c *RedisCache) Has(str string) (bool, error) + func (c *RedisCache) Set(str string, value interface{}, ttl ...int) error + type TypedCache struct + func NewTypedCache[T any](c Cache) *TypedCache[T] + func (tc *TypedCache[T]) EmptyByMatch(pattern string) error + func (tc *TypedCache[T]) Flush() error + func (tc *TypedCache[T]) Forget(key string) error + func (tc *TypedCache[T]) Get(key string) (T, error) + func (tc *TypedCache[T]) Has(key string) (bool, error) + func (tc *TypedCache[T]) Set(key string, value T, ttl ...int) error