MCPcopy Create free account
hub / github.com/ampproject/amphtml / constructor

Method constructor

build-system/common/transform-cache.js:18–28  ·  view source on GitHub ↗

* @param {string} cacheName

(cacheName)

Source from the content-addressed store, hash-verified

16 * @param {string} cacheName
17 */
18 constructor(cacheName) {
19 /** @type {string} */
20 this.cacheDir = path.resolve(__dirname, '..', '..', cacheName);
21 fs.ensureDirSync(this.cacheDir);
22
23 /** @type {Map<string, Promise<T>>} */
24 this.transformMap = new Map();
25
26 /** @type {Set<string>} */
27 this.fsCache = new Set(fs.readdirSync(this.cacheDir));
28 }
29
30 /**
31 * @param {string} hash

Callers

nothing calls this directly

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected