all repos

mugit @ 2d21be8e8bdb9a2d9d01e55310508ee3dd398ae6

🐮 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
}