Versions in this module Expand all Collapse all v0 v0.9.0 Jan 7, 2026 Changes in this version + type Cache interface + Close func() error + Delete func(ctx context.Context, key string) error + DeletePattern func(ctx context.Context, pattern string) error + Exists func(ctx context.Context, key string) (bool, error) + Get func(ctx context.Context, key string) (interface{}, error) + Set func(ctx context.Context, key string, value interface{}, ttl time.Duration) error + type MemoryCache struct + func NewMemoryCache(size int, ttl time.Duration) *MemoryCache + func (m *MemoryCache) Close() error + func (m *MemoryCache) Delete(ctx context.Context, key string) error + func (m *MemoryCache) DeletePattern(ctx context.Context, pattern string) error + func (m *MemoryCache) Exists(ctx context.Context, key string) (bool, error) + func (m *MemoryCache) Get(ctx context.Context, key string) (interface{}, error) + func (m *MemoryCache) Set(ctx context.Context, key string, value interface{}, ttl time.Duration) error + type RedisCache struct + func NewRedisCache(host string, port int, ttl time.Duration) (*RedisCache, error) + func (r *RedisCache) Close() error + func (r *RedisCache) Delete(ctx context.Context, key string) error + func (r *RedisCache) DeletePattern(ctx context.Context, pattern string) error + func (r *RedisCache) Exists(ctx context.Context, key string) (bool, error) + func (r *RedisCache) Get(ctx context.Context, key string) (interface{}, error) + func (r *RedisCache) Set(ctx context.Context, key string, value interface{}, ttl time.Duration) error