summaryrefslogtreecommitdiff
path: root/internal/cache/visibility.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-04-02 11:03:40 +0100
committerLibravatar GitHub <noreply@github.com>2024-04-02 12:03:40 +0200
commitadf345f1ec0cb76a0df94a4505143d891659cba9 (patch)
treee0cca289c0a50f30191d4b65a2c336704570e470 /internal/cache/visibility.go
parent[feature] Option to hide followers/following (#2788) (diff)
downloadgotosocial-adf345f1ec0cb76a0df94a4505143d891659cba9.tar.xz
[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 :innocent: --------- Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
Diffstat (limited to 'internal/cache/visibility.go')
-rw-r--r--internal/cache/visibility.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/cache/visibility.go b/internal/cache/visibility.go
index 878efcdb8..e280054ec 100644
--- a/internal/cache/visibility.go
+++ b/internal/cache/visibility.go
@@ -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,
})
}