mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 08:47:28 -06:00
[bugfix] update go-cache to v3.3.3 (#1778)
* update go-cache to v3.3.1 Signed-off-by: kim <grufwub@gmail.com> * bump go-cache again Signed-off-by: kim <grufwub@gmail.com> * remove accidentally comitted build-script changes Signed-off-by: kim <grufwub@gmail.com> * now v3.3.3 ... Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
514eb8c83e
commit
2b7c815ed6
6 changed files with 466 additions and 240 deletions
7
vendor/codeberg.org/gruf/go-cache/v3/cache.go
generated
vendored
7
vendor/codeberg.org/gruf/go-cache/v3/cache.go
generated
vendored
|
|
@ -15,10 +15,10 @@ type Cache[Key comparable, Value any] interface {
|
|||
Stop() bool
|
||||
|
||||
// SetEvictionCallback sets the eviction callback to the provided hook.
|
||||
SetEvictionCallback(hook func(*ttlcache.Entry[Key, Value]))
|
||||
SetEvictionCallback(hook func(Key, Value))
|
||||
|
||||
// SetInvalidateCallback sets the invalidate callback to the provided hook.
|
||||
SetInvalidateCallback(hook func(*ttlcache.Entry[Key, Value]))
|
||||
SetInvalidateCallback(hook func(Key, Value))
|
||||
|
||||
// SetTTL sets the cache item TTL. Update can be specified to force updates of existing items in the cache, this will simply add the change in TTL to their current expiry time.
|
||||
SetTTL(ttl time.Duration, update bool)
|
||||
|
|
@ -44,6 +44,9 @@ type Cache[Key comparable, Value any] interface {
|
|||
// Invalidate deletes a value from the cache, calling the invalidate callback.
|
||||
Invalidate(key Key) bool
|
||||
|
||||
// InvalidateAll is equivalent to multiple Invalidate calls.
|
||||
InvalidateAll(keys ...Key) bool
|
||||
|
||||
// Clear empties the cache, calling the invalidate callback on each entry.
|
||||
Clear()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue