feat(memory-management): Introduce MEMORY_CONFIG for session and DNS management, including session TTL, cleanup intervals, and proxy dispatcher limits.

This commit is contained in:
decolua
2026-03-12 15:57:21 +07:00
parent 372b985ee9
commit 8223c87988
4 changed files with 41 additions and 17 deletions

View File

@@ -487,6 +487,14 @@ export const CACHE_TTL = {
modelAlias: 3600 // 1 hour
};
// Memory management config
export const MEMORY_CONFIG = {
sessionTtlMs: 2 * 60 * 60 * 1000, // 2 hours per session entry
sessionCleanupIntervalMs: 30 * 60 * 1000, // cleanup every 30 minutes
dnsCacheTtlMs: 5 * 60 * 1000, // 5 minutes DNS TTL
proxyDispatchersMaxSize: 20, // max proxy agent instances
};
// Default max tokens
export const DEFAULT_MAX_TOKENS = 64000;