UNPKG

@arcgis/core

Version:

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

6 lines (5 loc) 641 B
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ import{LRUCache as t}from"../LRUCache.js";import e from"./WhereClause.js";class r{constructor(e,r){this._cache=new t(e),this._invalidCache=new t(r)}get(t,r){const i=`${r?.uid}:${t}`,c=this._cache.get(i);if(c)return c;if(null!=this._invalidCache.get(i))return null;try{const c=e.create(t,{fieldsIndex:r});return this._cache.put(i,c),c}catch(n){return this._invalidCache.put(i,n),null}}getError(t,e){const r=`${e?.uid}:${t}`;return this._invalidCache.get(r)??null}}export{r as WhereClauseCache};