mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-06 17:51:50 +01:00
* fix: Implement single-flight deduplication for getAllServerConfigs and optimize Redis getAll method - Added a pending promises map in MCPServersRegistry to handle concurrent calls to getAllServerConfigs, ensuring that multiple requests for the same userId are deduplicated. - Introduced a new fetchAllServerConfigs method to streamline the fetching process and improve performance. - Enhanced the getAll method in ServerConfigsCacheRedis to utilize MGET for batch fetching, significantly reducing Redis roundtrips and improving efficiency. - Added comprehensive tests for deduplication and performance optimizations, ensuring consistent results across concurrent calls and validating the new implementation. * refactor: Enhance logging in ServerConfigsCacheRedis for getAll method - Added debug logging to track the execution time and key retrieval in the getAll method of ServerConfigsCacheRedis. - Improved import organization by consolidating related imports for better clarity and maintainability. * test: Update MCPServersRegistry and ServerConfigsCacheRedis tests for call count assertions - Modified MCPServersRegistry integration tests to assert specific call counts for cache retrieval, ensuring accurate tracking of Redis interactions. - Refactored ServerConfigsCacheRedis integration tests to rename the test suite for clarity and improved focus on parallel fetching optimizations. - Enhanced the getAll method in ServerConfigsCacheRedis to utilize batching for improved performance during key retrieval. * chore: Simplify key extraction in ServerConfigsCacheRedis - Streamlined the key extraction logic in the getAll method of ServerConfigsCacheRedis by consolidating the mapping function into a single line, enhancing code readability and maintainability. |
||
|---|---|---|
| .. | ||
| src | ||
| .gitignore | ||
| babel.config.cjs | ||
| jest.config.mjs | ||
| package.json | ||
| rollup.config.js | ||
| tsconfig-paths-bootstrap.mjs | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| tsconfig.spec.json | ||