1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-16 04:24:56 +02:00
thalos/internal/cache/store.go

19 lines
448 B
Go

package cache
import (
"context"
"time"
)
// Interface to a cache storage.
type Store interface {
// Set an item in the store.
Set(ctx context.Context, key string, value any, TTL time.Duration) error
// Get an item from the store.
// returns an error if key is not found or there is other problems.
Get(ctx context.Context, key string, value any) error
// Check if a key exist in the store.
Has(ctx context.Context, key string) bool
}