UNPKG

cf-workers-query

Version:

Automatically cache and revalidate data in Cloudflare Workers. Using the Cache API and Execution Context

23 lines (21 loc) 474 B
import { CacheApiAdaptor, __name, createQuery, defineCFExecutionContext, getCFExecutionContext } from "./chunk-5W3W5EQR.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, defineCFExecutionContext, getCFExecutionContext, invalidateQuery };