Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
2 lines
343 B
Plaintext
2 lines
343 B
Plaintext
class e{constructor(e){this.maxSize=e,this.cache=new Map}set(e,t){if(!this.cache.has(e)&&this.cache.size>=this.maxSize){const e=this.cache.keys().next().value;void 0!==e&&this.cache.delete(e)}this.cache.set(e,{key:e,value:t})}get(e){const t=this.cache.get(e);if(t)return this.cache.delete(e),this.cache.set(e,t),t.value}}export{e as default};
|