mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-10-21 09:32:24 +00:00
⚡ perf: Avoid Parallel Full and Paged Prompt Loading on Startup (#15031)
Co-authored-by: Danny Avila <danny@librechat.ai>
This commit is contained in:
parent
57f3cb750b
commit
0383030817
20 changed files with 1350 additions and 87 deletions
4
api/cache/getLogStores.js
vendored
4
api/cache/getLogStores.js
vendored
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue