all repos

mugit @ afcecfcfa4a38ad7a1008ab2f44cc2e978081f71

🐮 git server that your cow will love

mugit/internal/cache/cache.go (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
cache: refactor; tests, 3 months ago
1
package cache
2
3
import (
4
	"errors"
5
)
6
7
var ErrNotFound = errors.New("not found")
8
9
type Cacher[T any] interface {
10
	Set(key string, val T)
11
	Get(key string) (val T, found bool)
12
}