Add Cache Response using Web Cache API #13189
kresnasatya
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background
I create a tools called Laravel Diff, a utility to compare what files changed when upgrade your Laravel framework. Previously, I use two repositories: SvelteKit for frontend and Worker (Cloudflare Workers) for backend. Now, I merge it into one repository thanks to Cloudflare Pages support (functions) in SvelteKit. Because SvelteKit and Cloudflare Pages communicate using Web API standards, it makes more easier to implement a Cache Response.
Problem
Now, here's the problem: the Cache Response is only available on Cloudflare not in SvelteKit itself. Let's say I use
adapter/node
in SvelteKit then I lose the Cache Response feature offered by Cloudflare. Hmm, I understand it must be the runtime environment responsible like NodeJS, Deno, or Bun. But, if it's possible to shipped it in SvelteKit first without waiting the runtime environment, I think it's a great movement.Syntax
From senkulabs/laraveldiff.org/src/routes/api/tags/+server.js
Beta Was this translation helpful? Give feedback.
All reactions