all repos

mugit @ f9a31fe264dab03ac66d4d4fe9037fc3cd45cff0

🐮 git server that your cow will love

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

1
2
3
4
5
6
7
8
9
10
11
12
package cache

import (
	"errors"
)

var ErrNotFound = errors.New("not found")

type Cacher[T any] interface {
	Set(key string, val T)
	Get(key string) (val T, found bool)
}