mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] bump go structr cache version -> v0.6.0 (#2773)
* update go-structr library -> v0.6.0, add necessary wrapping types + code changes to support these changes * update readme with go-structr package changes * improved wrapping of the SliceCache type * add code comments for the cache wrapper types * remove test.out 😇 --------- Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
This commit is contained in:
6
internal/cache/visibility.go
vendored
6
internal/cache/visibility.go
vendored
@@ -24,7 +24,7 @@ import (
|
||||
)
|
||||
|
||||
type VisibilityCache struct {
|
||||
structr.Cache[*CachedVisibility]
|
||||
StructCache[*CachedVisibility]
|
||||
}
|
||||
|
||||
func (c *Caches) initVisibility() {
|
||||
@@ -42,7 +42,7 @@ func (c *Caches) initVisibility() {
|
||||
return v2
|
||||
}
|
||||
|
||||
c.Visibility.Init(structr.Config[*CachedVisibility]{
|
||||
c.Visibility.Init(structr.CacheConfig[*CachedVisibility]{
|
||||
Indices: []structr.IndexConfig{
|
||||
{Fields: "ItemID", Multiple: true},
|
||||
{Fields: "RequesterID", Multiple: true},
|
||||
@@ -50,7 +50,7 @@ func (c *Caches) initVisibility() {
|
||||
},
|
||||
MaxSize: cap,
|
||||
IgnoreErr: ignoreErrors,
|
||||
CopyValue: copyF,
|
||||
Copy: copyF,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user