MCPcopy
hub / github.com/webpack/webpack / restore

Method restore

lib/cache/IdleFileCachePlugin.js:75–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73 { name: PLUGIN_NAME, stage: Cache.STAGE_DISK },
74 (identifier, etag, gotHandlers) => {
75 const restore = () =>
76 strategy.restore(identifier, etag).then((cacheEntry) => {
77 if (cacheEntry === undefined) {
78 gotHandlers.push((result, callback) => {
79 if (result !== undefined) {
80 pendingIdleTasks.set(identifier, () =>
81 strategy.store(identifier, etag, result)
82 );
83 }
84 callback();
85 });
86 } else {
87 return cacheEntry;
88 }
89 });
90 const pendingTask = pendingIdleTasks.get(identifier);
91 if (pendingTask !== undefined) {
92 pendingIdleTasks.delete(identifier);

Callers 6

describeCasesFunction · 0.45
Compiler.test.jsFile · 0.45
describeCasesFunction · 0.45

Calls 4

callbackFunction · 0.50
pushMethod · 0.45
setMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected