|
|
@ -8,6 +8,6 @@ import ( |
|
|
|
// Cache is a generic key value cache interface.
|
|
|
|
// Cache is a generic key value cache interface.
|
|
|
|
type Cache interface { |
|
|
|
type Cache interface { |
|
|
|
Get(ctx context.Context, key string) (interface{}, error) |
|
|
|
Get(ctx context.Context, key string) (interface{}, error) |
|
|
|
Put(ctx context.Context, key string, value interface{}, expired time.Duration) error |
|
|
|
Put(ctx context.Context, key string, value interface{}, ttl time.Duration) error |
|
|
|
Delete(ctx context.Context, key string) error |
|
|
|
Delete(ctx context.Context, key string) error |
|
|
|
} |
|
|
|
} |
|
|
|