mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-03-31 22:08:49 +02:00
22 lines
349 B
Go
22 lines
349 B
Go
package cache
|
|
|
|
import (
|
|
"errors"
|
|
"time"
|
|
)
|
|
|
|
var ErrCacheMiss = errors.New("cache: key is missing")
|
|
|
|
type Item struct {
|
|
Key string
|
|
Object interface{}
|
|
// Expiration is the cache expiration time.
|
|
Expiration time.Duration
|
|
}
|
|
|
|
type CacheClient interface {
|
|
Set(item *Item) error
|
|
Get(key string, obj interface{}) error
|
|
Delete(key string) error
|
|
}
|