mirror of
https://github.com/eosswedenorg/thalos
synced 2026-07-03 11:53:41 +02:00
Adding app/cache/store.go
This commit is contained in:
parent
d6d9fa5ca0
commit
23d05e5512
1 changed files with 15 additions and 0 deletions
15
app/cache/store.go
vendored
Normal file
15
app/cache/store.go
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
package cache
|
||||||
|
|
||||||
|
import "time"
|
||||||
|
|
||||||
|
type Store interface {
|
||||||
|
// Set an item in the store.
|
||||||
|
Set(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(key string, value any) error
|
||||||
|
|
||||||
|
// Check if a key exist in the store.
|
||||||
|
Has(key string) bool
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue