[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:
kim 2024-04-02 11:03:40 +01:00 committed by GitHub
commit adf345f1ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
62 changed files with 2412 additions and 5857 deletions

View file

@ -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,
})
}