AIClient-2-API/src/utils
aka686 2aff6013d7 fix: 为 Logger.requestContext 添加 TTL 清理机制防止内存泄漏
长时间运行的服务中,如果 clearRequestContext 未被正确调用(如请求异常中断),
requestContext Map 会持续增长导致内存泄漏。

新增:
- 每个上下文条目记录 _createdAt 时间戳
- 每 60 秒定期扫描并清除超过 5 分钟的过期条目
- Map 为空时自动停止定时器,避免不必要的开销
- close() 时清理定时器
2026-02-26 23:38:43 +08:00
..
common.js feat(architecture): 重构适配器注册机制并引入并发控制系统 2026-02-26 18:19:38 +08:00
logger.js fix: 为 Logger.requestContext 添加 TTL 清理机制防止内存泄漏 2026-02-26 23:38:43 +08:00
provider-strategies.js feat(architecture): 重构适配器注册机制并引入并发控制系统 2026-02-26 18:19:38 +08:00
provider-strategy.js feat(logging): 添加日志系统配置和下载功能 2026-01-25 17:24:39 +08:00
provider-utils.js feat(architecture): 重构适配器注册机制并引入并发控制系统 2026-02-26 18:19:38 +08:00
proxy-utils.js Merge branch 'main' of https://github.com/justlovemaki/AIClient-2-API 2026-01-25 23:25:04 +08:00