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

Method get

src/core/data-structures/lru-cache.js:41–48  ·  view source on GitHub ↗

* @param {number|string} key * @return {T|undefined} The cached payload.

(key)

Source from the content-addressed store, hash-verified

39 * @return {T|undefined} The cached payload.
40 */
41 get(key) {
42 const cacheable = this.cache_[key];
43 if (cacheable) {
44 cacheable.access = ++this.access_;
45 return cacheable.payload;
46 }
47 return undefined;
48 }
49
50 /**
51 * @param {number|string} key

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected