UNPKG

@slan-health/taro-vueuse

Version:

taro vue版本hooks

19 lines (18 loc) 420 B
const cacheQuery = /* @__PURE__ */ new Map(); const setCacheQuery = (cacheKey, query) => { cacheQuery.set(cacheKey, query); query.then((res) => { cacheQuery.delete(cacheKey); return res; }).catch(() => { cacheQuery.delete(cacheKey); }); }; const getCacheQuery = (cacheKey) => { return cacheQuery.get(cacheKey); }; export { getCacheQuery, setCacheQuery }; //# sourceMappingURL=cacheQuery.js.map