MCPcopy
hub / github.com/webpack/webpack / cached

Method cached

lib/ModuleGraph.js:982–985  ·  view source on GitHub ↗

* Returns computed value or cached. * @template {EXPECTED_ANY[]} T * @template R * @param {(moduleGraph: ModuleGraph, ...args: T) => R} fn computer * @param {T} args arguments * @returns {R} computed value or cached

(fn, ...args)

Source from the content-addressed store, hash-verified

980 * @returns {R} computed value or cached
981 */
982 cached(fn, ...args) {
983 if (this._cache === undefined) return fn(this, ...args);
984 return this._cache.cachedProvide(fn, this, args);
985 }
986
987 /**
988 * Sets module mem caches.

Callers 2

getIdentifierMethod · 0.80

Calls 2

cachedProvideMethod · 0.80
fnFunction · 0.50

Tested by

no test coverage detected