all repos

mugit @ 14c53fa64a1bbc4ce1c12b866aed42f80e47ebb2

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