MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / fetchFileCached

Function fetchFileCached

Support/SingleFileLibs/javascript/app.js:283–289  ·  view source on GitHub ↗
(ref, path)

Source from the content-addressed store, hash-verified

281 }
282
283 async function fetchFileCached(ref, path) {
284 const key = `${ref}:${path}`;
285 if (state.fileContentCache.has(key)) return state.fileContentCache.get(key);
286 const text = await fetchText(rawUrl(ref, path));
287 state.fileContentCache.set(key, text);
288 return text;
289 }
290
291 async function buildSingleLibraryHeader(libraryName, ref, tree) {
292 const ctx = {

Callers 1

readFileFunction · 0.85

Calls 4

fetchTextFunction · 0.85
rawUrlFunction · 0.85
setMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected