Language concepts
Cache key
Identity or representation used to determine reuse. Must reflect all result-relevant inputs; object keys in Map compare by identity.
Formal Syntax & Structure
javascript syntaxjavascript
cache.set(key, result)Working Example
Example Snippetjavascript
const a={id:1};const m=new Map([[a,2]]);console.log(m.has({id:1}),m.has(a));