MCPcopy
hub / github.com/webpack/webpack / store

Method store

lib/cache/PackFileCacheStrategy.js:1397–1403  ·  view source on GitHub ↗

* Returns promise. * @param {string} identifier unique name for the resource * @param {Etag | null} etag etag of the resource * @param {Data} data cached content * @returns {Promise<void>} promise

(identifier, etag, data)

Source from the content-addressed store, hash-verified

1395 * @returns {Promise<void>} promise
1396 */
1397 store(identifier, etag, data) {
1398 if (this.readonly) return Promise.resolve();
1399
1400 return this._getPack().then((pack) => {
1401 pack.set(identifier, etag === null ? null : etag.toString(), data);
1402 });
1403 }
1404
1405 /**
1406 * Returns promise to the cached content.

Callers 4

doRealResolveMethod · 0.45
applyMethod · 0.45
restoreMethod · 0.45
finishWithMethod · 0.45

Calls 4

_getPackMethod · 0.95
resolveMethod · 0.65
setMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected