mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
housekeeping
This commit is contained in:
@@ -123,8 +123,11 @@ export function upsertSettings(settingsMapOrEntry, userId = null) {
|
||||
);
|
||||
}
|
||||
}
|
||||
// keep cache in sync (only for global settings)
|
||||
// Invalidate cache synchronously so the next getSettings() call rebuilds it.
|
||||
// refreshSettingsCache() is async (reads config.json), so we cannot await it
|
||||
// here without making upsertSettings async everywhere. Nulling is safe because
|
||||
// getSettings() will call refreshSettingsCache() on the next invocation.
|
||||
if (userId == null) {
|
||||
refreshSettingsCache();
|
||||
cachedSettingsConfig = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user