Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type CacheService ¶
type CacheService[K comparable, V any] struct { // contains filtered or unexported fields }
func NewCacheService ¶
func NewCacheService[K comparable, V any](ctx context.Context, cfg Config, db DB[K, V]) *CacheService[K, V]
func (*CacheService[K, V]) Get ¶
func (srv *CacheService[K, V]) Get(k K) (v V, err error)
func (*CacheService[K, V]) Set ¶
func (srv *CacheService[K, V]) Set(k K, v V) error
Click to show internal directories.
Click to hide internal directories.