From e18329a17e535c0ea830e8f5c7ed263da652f278 Mon Sep 17 00:00:00 2001 From: binwiederhier Date: Mon, 1 Jun 2026 14:08:33 -0400 Subject: [PATCH] Log changes --- user/access_cache.go | 6 +++--- user/manager.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/user/access_cache.go b/user/access_cache.go index 0a30f2bd..b4a1641e 100644 --- a/user/access_cache.go +++ b/user/access_cache.go @@ -65,15 +65,15 @@ func (c *accessCache) Lookup(usernameOrEveryone, topic string) (read, write, fou return false, false, false } -// reload scans (user_name, topic, read, write) rows and merges them into the +// Reload scans (user_name, topic, read, write) rows and merges them into the // cache. With no usernames the cache is replaced wholesale; otherwise the // query is invoked with those usernames as positional args and only the // listed users' slices are touched (a username absent from the result drops // them from both maps). Runs against the primary so a reload after a // mutation sees the just-written rows. -func (c *accessCache) reload(d *db.DB, query string, usernames ...string) error { +func (c *accessCache) Reload(d *db.DB, query string, usernames ...string) error { started := time.Now() - scope := "all_users" + scope := "full" if len(usernames) > 0 { scope = "users=" + strings.Join(usernames, ",") } diff --git a/user/manager.go b/user/manager.go index ccd69c10..e1a25a04 100644 --- a/user/manager.go +++ b/user/manager.go @@ -103,9 +103,9 @@ func (a *Manager) maybeReloadAccessCache(usernames ...string) error { return nil } if len(usernames) == 0 { - return a.accessCache.reload(a.db, a.queries.selectAccessCacheAll) + return a.accessCache.Reload(a.db, a.queries.selectAccessCacheAll) } - return a.accessCache.reload(a.db, a.queries.selectAccessCacheUsers(len(usernames)), usernames...) + return a.accessCache.Reload(a.db, a.queries.selectAccessCacheUsers(len(usernames)), usernames...) } // asyncAccessCacheReloadLoop periodically bulk-reloads the access cache so that