UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 633 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.32/esri/copyright.txt for details. */ import"../../../../core/has.js";import{baseArrayMemory as e,baseObjectMemory as t}from"../../../../core/memoryEstimations.js";class s{constructor(e){this._cache=e.newCache("QueryEngine",null,-1)}clear(){this._cache.clear()}destroy(){this._cache.destroy()}get(e){return this._cache.get(e)?.items}put(e,t){this._cache.put(e,new c(t))}get test(){}}class c{constructor(e){this.items=e}get cachedMemory(){return this.items.reduce(((e,t)=>e+t.usedMemory),e+t)}}export{s as QueryEngineCache};