From 517f23c26d7a7deea31322b4f3b2c8e24bc8a522 Mon Sep 17 00:00:00 2001 From: rUv Date: Wed, 7 Jan 2026 15:04:09 +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:09Z - 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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts b/v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts index d31a48d03e..7243582aef 100644 --- a/v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts +++ b/v3/@claude-flow/cli/src/ruvector/graph-analyzer.ts @@ -320,7 +320,7 @@ function resolveImportPath(importPath: string, fromFile: string, rootDir: string // ============================================================================ /** - * Build dependency graph from source directory + * Build dependency graph from source directory (with caching) */ export async function buildDependencyGraph( rootDir: string, @@ -328,8 +328,18 @@ export async function buildDependencyGraph( include?: string[]; exclude?: string[]; maxDepth?: number; + skipCache?: boolean; } = {} ): Promise { + // Check cache first + const cacheKey = `${rootDir}:${JSON.stringify(options)}`; + if (!options.skipCache) { + const cached = graphCache.get(cacheKey); + if (cached && Date.now() - cached.timestamp < GRAPH_CACHE_TTL_MS) { + return cached.graph; + } + } + const startTime = Date.now(); const nodes = new Map(); const edges: GraphEdge[] = [];