/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
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};
