mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 01:12:25 -05: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:
parent
f05874be30
commit
adf345f1ec
62 changed files with 2412 additions and 5857 deletions
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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue