all repos

mugit @ e5b0a7c1d1774b6f05ca7db97a574327ea3f5578

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