Versions in this module Expand all Collapse all v0 v0.0.2 Feb 15, 2026 v0.0.1 Feb 15, 2026 Changes in this version + var ErrKeyNotFound = errors.New("key not found") + type Cache interface + Close func() error + Delete func(key string) error + Exists func(key string) bool + Get func(key string) (interface{}, error) + Set func(key string, value interface{}, ttl time.Duration) error + func New(config Config) (Cache, error) + type Config struct + RedisAddr string + RedisDB int + RedisPassword string + Type string + type MemoryCache struct + func (c *MemoryCache) Close() error + func (c *MemoryCache) Delete(key string) error + func (c *MemoryCache) Exists(key string) bool + func (c *MemoryCache) Get(key string) (interface{}, error) + func (c *MemoryCache) Set(key string, value interface{}, ttl time.Duration) error + type RedisCache struct + func (c *RedisCache) Close() error + func (c *RedisCache) Delete(key string) error + func (c *RedisCache) Exists(key string) bool + func (c *RedisCache) Get(key string) (interface{}, error) + func (c *RedisCache) Set(key string, value interface{}, ttl time.Duration) error