all repos

mugit @ v0.2.0

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