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