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

Function getOrCreateCache

test/fixtures/snapshot/typescript.js:42817–42825  ·  view source on GitHub ↗
(cacheWithRedirects, redirectedReference, key, create)

Source from the content-addressed store, hash-verified

42815 }
42816 }
42817 function getOrCreateCache(cacheWithRedirects, redirectedReference, key, create) {
42818 var cache = cacheWithRedirects.getOrCreateMapOfCacheRedirects(redirectedReference);
42819 var result = cache.get(key);
42820 if (!result) {
42821 result = create();
42822 cache.set(key, result);
42823 }
42824 return result;
42825 }
42826 function updateRedirectsMap(options, directoryToModuleNameMap, moduleNameToDirectoryMap) {
42827 if (!options.configFile)
42828 return;

Callers 2

Calls 3

createFunction · 0.70
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…