Bound workspace git service caches to fix daemon memory leak (#1200)

The seven Map-based caches in WorkspaceGitServiceImpl had no eviction —
the 15s TTL only marked entries stale before refetching in place. Long-
lived daemons accumulated entries for every ephemeral worktree cwd that
ever ran, with checkoutDiffCache holding multi-MB highlighted diffs.

Switch to LRUCache. checkoutDiffCache caps at 64 (heavy values); the
other six aux caches cap at 256. Stale-in-place TTL semantics are
unchanged.
This commit is contained in:
Mohamed Boudra
2026-05-28 16:38:50 +08:00
committed by GitHub
parent 3ac182cffc
commit f20393dbb7
4 changed files with 115 additions and 79 deletions
+1
View File
@@ -78,6 +78,7 @@
"dotenv": "^17.2.3",
"express": "^4.18.2",
"fast-deep-equal": "^3.1.3",
"lru-cache": "^11.5.1",
"mnemonic-id": "^3.2.7",
"node-pty": "1.2.0-beta.11",
"onnxruntime-node": "^1.23.0",