ensure list related caches are correctly invalidated

This commit is contained in:
kim 2024-09-12 11:53:57 +01:00
commit 6338e4aa21
2 changed files with 103 additions and 40 deletions

View file

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