mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 05:27:29 -06:00
[bugfix] update go-cache version to support multi-keying (#1756)
* update go-cache version to support multi-keying Signed-off-by: kim <grufwub@gmail.com> * improved cache invalidation Signed-off-by: kim <grufwub@gmail.com> --------- Signed-off-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
65cd1acbdf
commit
8275d70e38
8 changed files with 90 additions and 67 deletions
4
internal/cache/visibility.go
vendored
4
internal/cache/visibility.go
vendored
|
|
@ -30,8 +30,8 @@ type VisibilityCache struct {
|
|||
// NOTE: the cache MUST NOT be in use anywhere, this is not thread-safe.
|
||||
func (c *VisibilityCache) Init() {
|
||||
c.Cache = result.New([]result.Lookup{
|
||||
{Name: "ItemID"},
|
||||
{Name: "RequesterID"},
|
||||
{Name: "ItemID", Multi: true},
|
||||
{Name: "RequesterID", Multi: true},
|
||||
{Name: "Type.RequesterID.ItemID"},
|
||||
}, func(v1 *CachedVisibility) *CachedVisibility {
|
||||
v2 := new(CachedVisibility)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue