MCPcopy Index your code
hub / github.com/nodejs/node / readFileWithCache

Function readFileWithCache

test/fixtures/snapshot/typescript.js:115893–115899  ·  view source on GitHub ↗
(fileName)

Source from the content-addressed store, hash-verified

115891 var directoryExistsCache = new ts.Map();
115892 var sourceFileCache = new ts.Map();
115893 var readFileWithCache = function (fileName) {
115894 var key = toPath(fileName);
115895 var value = readFileCache.get(key);
115896 if (value !== undefined)
115897 return value !== false ? value : undefined;
115898 return setReadFileCache(key, fileName);
115899 };
115900 var setReadFileCache = function (key, fileName) {
115901 var newValue = originalReadFile.call(host, fileName);
115902 readFileCache.set(key, newValue !== undefined ? newValue : false);

Callers

nothing calls this directly

Calls 3

toPathFunction · 0.85
setReadFileCacheFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…