⚡ perf: Avoid Parallel Full and Paged Prompt Loading on Startup (#15031)

Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
Marco Beretta 2026-08-26 03:21:17 +02:00 • committed by GitHub
parent 57f3cb750b
commit 0383030817
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 1350 additions and 87 deletions

View file

@ -11,7 +11,7 @@ const {
registerShutdownTask,
} = require('@librechat/api');
/** No-op store registered when the user principals cache is disabled (TTL of 0). */
/** No-op store for cache namespaces that are deliberately disabled. */
const disabledCache = {
get: async () => undefined,
set: async () => undefined,
@ -46,6 +46,8 @@ const namespaces = {
[CacheKeys.ROLES]: standardCache(CacheKeys.ROLES),
[CacheKeys.USER_PRINCIPALS]: userPrincipalsCache() ?? disabledCache,
/** Authorization IDs stay uncached because a failed shared invalidation cannot fail closed. */
[CacheKeys.PROMPT_GROUPS_ACCESS]: disabledCache,
[CacheKeys.APP_CONFIG]: standardCache(CacheKeys.APP_CONFIG),
[CacheKeys.CONFIG_STORE]: standardCache(CacheKeys.CONFIG_STORE),
[CacheKeys.TOOL_CACHE]: standardCache(CacheKeys.TOOL_CACHE),