mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore]: Bump codeberg.org/gruf/go-cache/v3 from 3.4.1 to 3.4.3 (#2022)
This commit is contained in:
18
vendor/codeberg.org/gruf/go-cache/v3/result/cache.go
generated
vendored
18
vendor/codeberg.org/gruf/go-cache/v3/result/cache.go
generated
vendored
@ -228,11 +228,15 @@ func (c *Cache[Value]) Load(lookup string, load func() (Value, error), keyParts
|
||||
|
||||
var evict func()
|
||||
|
||||
// Acquire cache lock.
|
||||
// Lock cache.
|
||||
c.cache.Lock()
|
||||
|
||||
defer func() {
|
||||
// Unlock cache.
|
||||
c.cache.Unlock()
|
||||
|
||||
if evict != nil {
|
||||
// Call evict.
|
||||
evict()
|
||||
}
|
||||
}()
|
||||
@ -266,21 +270,25 @@ func (c *Cache[Value]) Store(value Value, store func() error) error {
|
||||
|
||||
var evict func()
|
||||
|
||||
// Acquire cache lock.
|
||||
// Lock cache.
|
||||
c.cache.Lock()
|
||||
|
||||
defer func() {
|
||||
// Unlock cache.
|
||||
c.cache.Unlock()
|
||||
|
||||
if evict != nil {
|
||||
// Call evict.
|
||||
evict()
|
||||
}
|
||||
|
||||
// Call invalidate.
|
||||
c.invalid(value)
|
||||
}()
|
||||
|
||||
// Store result in cache.
|
||||
evict = c.store(result)
|
||||
|
||||
// Call invalidate.
|
||||
c.invalid(value)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -13,7 +13,7 @@ codeberg.org/gruf/go-bytesize
|
||||
# codeberg.org/gruf/go-byteutil v1.1.2
|
||||
## explicit; go 1.16
|
||||
codeberg.org/gruf/go-byteutil
|
||||
# codeberg.org/gruf/go-cache/v3 v3.4.1
|
||||
# codeberg.org/gruf/go-cache/v3 v3.4.3
|
||||
## explicit; go 1.19
|
||||
codeberg.org/gruf/go-cache/v3
|
||||
codeberg.org/gruf/go-cache/v3/result
|
||||
|
Reference in New Issue
Block a user