mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2026-01-04 03:13:16 -06:00
ensure list related caches are correctly invalidated
This commit is contained in:
parent
af1be28c2b
commit
6338e4aa21
2 changed files with 103 additions and 40 deletions
7
internal/cache/invalidate.go
vendored
7
internal/cache/invalidate.go
vendored
|
|
@ -145,7 +145,12 @@ func (c *Caches) OnInvalidateFollowRequest(followReq *gtsmodel.FollowRequest) {
|
|||
}
|
||||
|
||||
func (c *Caches) OnInvalidateList(list *gtsmodel.List) {
|
||||
// Invalidate list ID entries.
|
||||
// Invalidate list IDs cache.
|
||||
c.DB.ListIDs.Invalidate(
|
||||
"a" + list.AccountID,
|
||||
)
|
||||
|
||||
// Invalidate listed IDs cache.
|
||||
c.DB.ListedIDs.Invalidate(
|
||||
"a"+list.ID,
|
||||
"f"+list.ID,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue