cf-workers-query
Version:
Automatically cache and revalidate data in Cloudflare Workers. Using the Cache API and Execution Context
19 lines (17 loc) • 368 B
JavaScript
import {
CacheApiAdaptor,
__name,
createQuery
} from "./chunk-KU66F4VA.js";
// src/lib/invalidate-query.ts
var invalidateQuery = /* @__PURE__ */ __name(({ queryKey, cacheName }) => {
const cache = new CacheApiAdaptor({
cacheName
});
return cache.delete(queryKey);
}, "invalidateQuery");
export {
CacheApiAdaptor,
createQuery,
invalidateQuery
};