UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 440 B
import{MemCacheStorage as t}from"./MemCache.js";class e{constructor(e,s){this._storage=new t,this._storage.maxSize=e,s&&this._storage.registerRemoveFunc("",s)}put(t,e,s){this._storage.put(t,e,s,1)}pop(t){return this._storage.pop(t)}get(t){return this._storage.get(t)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}}export{e as default};