Only serve _app/immutable with immutable cache headers#5051
Only serve _app/immutable with immutable cache headers#5051Rich-Harris merged 16 commits intomasterfrom
_app/immutable with immutable cache headers#5051Conversation
🦋 Changeset detectedLatest commit: 257d2fd The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Previous |
|
Having It should be possible to just purge your CDN cache, though? |
Yes, but i was thinking about users that already downloaded the |
|
For users it's not an issue — the request is issued with a |
|
Yes, you're right! At least in Chrome, its works today, without a CDN. |
benmccann
left a comment
There was a problem hiding this comment.
I think you'll also need to update this line:
kit/packages/adapter-netlify/index.js
Line 67 in 4592b76
benmccann
left a comment
There was a problem hiding this comment.
I wonder if build is the best name for this new directory because it seems like it'll be weird to have build/_app/build. How about immutable? That would also hopefully help in keeping anyone from accidentally sticking a mutable file there
|
Yeah, I like |
benmccann
left a comment
There was a problem hiding this comment.
lgtm. though I mainly reviewed the netlify and node adapters since I'm most familiar with them. might be good to get eyes on the cloudflare adapters as well
_app/build with immutable cache headers_app/immutable with immutable cache headers
|
I took another run at the cloudflare adapters and noticed a bug — now fixed |
Rather than serving everything under
/_appwith animmutablecache header (including/_app/version.json, which is definitely not immutable), this moves immutable assets into/_app/buildso they can easily be given separate treatment.Fixes #4837.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. All changesets should bepatchuntil SvelteKit 1.0