From bfef09d55e08ab96ac833d73625bdfa5e2b97efe Mon Sep 17 00:00:00 2001 From: rUv Date: Wed, 7 Jan 2026 15:04:24 +0000 Subject: [PATCH] Checkpoint: File edits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automatic checkpoint created by Claude Code - Branch: v3 - Timestamp: 2026-01-07T15:04:24Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts b/v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts index 3de4017581..ccf277c829 100644 --- a/v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts +++ b/v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts @@ -1026,7 +1026,7 @@ function findCommonPrefix(strings: string[]): string { } /** - * Full graph analysis + * Full graph analysis (with caching) */ export async function analyzeGraph( rootDir: string, @@ -1034,9 +1034,19 @@ export async function analyzeGraph( includeBoundaries?: boolean; includeModules?: boolean; numPartitions?: number; + skipCache?: boolean; } = {} ): Promise { - const graph = await buildDependencyGraph(rootDir); + // Check cache first + const cacheKey = `analysis:${rootDir}:${JSON.stringify(options)}`; + if (!options.skipCache) { + const cached = analysisResultCache.get(cacheKey); + if (cached && Date.now() - cached.timestamp < ANALYSIS_CACHE_TTL_MS) { + return cached.result; + } + } + + const graph = await buildDependencyGraph(rootDir, { skipCache: options.skipCache }); // Calculate statistics const nodeCount = graph.nodes.size;