MCPcopy Create free account
hub / github.com/codag-megalith/codag-visualizer / cacheBatchGraph

Function cacheBatchGraph

frontend/src/analysis/workspace.ts:704–717  ·  view source on GitHub ↗
(
                    files: { path: string; content: string }[],
                    graph: WorkflowGraph
                )

Source from the content-addressed store, hash-verified

702
703 // Helper to cache batch immediately after it completes
704 async function cacheBatchGraph(
705 files: { path: string; content: string }[],
706 graph: WorkflowGraph
707 ) {
708 if (!bypassCache) {
709 const contentMap: Record<string, string> = {};
710 for (const f of files) contentMap[f.path] = f.content;
711 await cache.setAnalysisResult(graph, contentMap);
712 cacheCallGraphsForFiles(contentMap, workspaceRoot);
713 cache.batchCompleted();
714 } else {
715 cache.batchCompleted();
716 }
717 }
718
719 // Track completed batches for incremental updates
720 let completedBatchCount = 0;

Callers 1

analyzeWorkspaceFunction · 0.85

Calls 3

setAnalysisResultMethod · 0.80
cacheCallGraphsForFilesFunction · 0.70
batchCompletedMethod · 0.45

Tested by

no test coverage detected