Versions in this module Expand all Collapse all v0 v0.0.1 Jul 17, 2024 Changes in this version + var ErrNotFound = errors.New("not found") + type CacheService struct + func NewCacheService[K comparable, V any](ctx context.Context, cfg Config, db DB[K, V]) *CacheService[K, V] + func (srv *CacheService[K, V]) Get(k K) (v V, err error) + func (srv *CacheService[K, V]) Set(k K, v V) error + type Config struct + Capacity int + TTL time.Duration + type DB interface + Get func(k K) (v V, ok error) + Set func(k K, v V) error