MCPcopy
hub / github.com/webpack/webpack / storePromise

Method storePromise

lib/CacheFacade.js:328–338  ·  view source on GitHub ↗

* Stores the provided identifier. * @template T * @param {string} identifier the cache identifier * @param {Etag | null} etag the etag * @param {T} data the value to store * @returns {Promise<void>} promise signals when the value is stored

(identifier, etag, data)

Source from the content-addressed store, hash-verified

326 * @returns {Promise<void>} promise signals when the value is stored
327 */
328 storePromise(identifier, etag, data) {
329 return new Promise((resolve, reject) => {
330 this._cache.store(`${this._name}|${identifier}`, etag, data, (err) => {
331 if (err) {
332 reject(err);
333 } else {
334 resolve();
335 }
336 });
337 });
338 }
339
340 /**
341 * Processes the provided identifier.

Callers 5

providePromiseMethod · 0.95
storePromiseMethod · 0.45
_applyOnCompilerMethod · 0.45
_loadEnvMethod · 0.45
applyFunction · 0.45

Calls 2

resolveFunction · 0.85
storeMethod · 0.45

Tested by 1

applyFunction · 0.36