Files
geo/server/internal/shared/cache/cache.go
T

16 lines
313 B
Go
Raw Normal View History

package cache
import (
"context"
"errors"
"time"
)
var ErrNotFound = errors.New("cache: key not found")
type Cache interface {
Get(ctx context.Context, key string) ([]byte, error)
Set(ctx context.Context, key string, value []byte, ttl time.Duration) error
Delete(ctx context.Context, key string) error
}