коммит произвёл
GitHub
родитель
b45ff0be5d
Коммит
717a4d04a9
8
services/cache/cache.go
поставляемый
8
services/cache/cache.go
поставляемый
@@ -20,19 +20,19 @@ type Cache interface {
|
||||
|
||||
// Set adds the given key and value to the store without an expiry. If the key already exists,
|
||||
// it will overwrite the previous value.
|
||||
Set(key string, value interface{}) error
|
||||
Set(key string, value any) error
|
||||
|
||||
// SetWithDefaultExpiry adds the given key and value to the store with the default expiry. If
|
||||
// the key already exists, it will overwrite the previous value
|
||||
SetWithDefaultExpiry(key string, value interface{}) error
|
||||
SetWithDefaultExpiry(key string, value any) error
|
||||
|
||||
// SetWithExpiry adds the given key and value to the cache with the given expiry. If the key
|
||||
// already exists, it will overwrite the previous value
|
||||
SetWithExpiry(key string, value interface{}, ttl time.Duration) error
|
||||
SetWithExpiry(key string, value any, ttl time.Duration) error
|
||||
|
||||
// Get the content stored in the cache for the given key, and decode it into the value interface.
|
||||
// Return ErrKeyNotFound if the key is missing from the cache
|
||||
Get(key string, value interface{}) error
|
||||
Get(key string, value any) error
|
||||
|
||||
// Remove deletes the value for a given key.
|
||||
Remove(key string) error
|
||||
|
||||
Ссылка в новой задаче
Block a user