MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / loadEmbeddingCache

Function loadEmbeddingCache

src/core/embeddings.ts:417–423  ·  view source on GitHub ↗
(rootDir: string, fileName: string)

Source from the content-addressed store, hash-verified

415}
416
417export async function loadEmbeddingCache(rootDir: string, fileName: string): Promise<EmbeddingCache> {
418 try {
419 return JSON.parse(await readFile(join(rootDir, CACHE_DIR, fileName), "utf-8"));
420 } catch {
421 return {};
422 }
423}
424
425export async function saveEmbeddingCache(rootDir: string, cache: EmbeddingCache, fileName: string): Promise<void> {
426 await ensureMcpDataDir(rootDir);

Callers 5

buildIdentifierIndexFunction · 0.85
semanticIdentifierSearchFunction · 0.85
loadCacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected