diff options
Diffstat (limited to 'internal/cache')
| -rw-r--r-- | internal/cache/db.go | 1 | ||||
| -rw-r--r-- | internal/cache/invalidate.go | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/internal/cache/db.go b/internal/cache/db.go index 6b482d5f8..d31017ccd 100644 --- a/internal/cache/db.go +++ b/internal/cache/db.go @@ -154,6 +154,7 @@ type DBCaches struct { Domains atomic.Pointer[int] Statuses atomic.Pointer[int] Users atomic.Pointer[int] + UserIDs atomic.Pointer[[]string] } // InteractionRequest provides access to the gtsmodel InteractionRequest database cache. diff --git a/internal/cache/invalidate.go b/internal/cache/invalidate.go index 569238e9b..863719b77 100644 --- a/internal/cache/invalidate.go +++ b/internal/cache/invalidate.go @@ -365,7 +365,8 @@ func (c *Caches) OnInvalidateUser(user *gtsmodel.User) { c.Visibility.Invalidate("ItemID", user.AccountID) c.Visibility.Invalidate("RequesterID", user.AccountID) - // Invalidate the local users count. + // Invalidate the local user IDs / count. + c.DB.LocalInstance.UserIDs.Store(nil) c.DB.LocalInstance.Users.Store(nil) } |
