-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(qwik-city): Prevent unexpected caching for q-data.json
more
#6808
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 2b5f6c5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
commit: |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a changeset?
So if I understand correctly, you should always deny caching because the client-side caching happens inside Qwik and not in the browser, right?
@@ -30,15 +30,5 @@ export const QWIK_BINDING_MAP = { | |||
"platformArchABI": "qwik.win32-x64-msvc.node" | |||
} | |||
] | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change should be reverted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did it. I don't know why this change has happened
@wmertens I have added the changeset. |
I think if the contents of |
What is it?
Description
I have introduced the fetch options to avoid caching for
q-data.json
whenopts.cacheClear
is set (at #6797), but it was not enough.As the
loadClientData
function manages caching by itself usingCLIENT_DATA_CACHE
, there is no need to use browser cache mechanism.Or rather if they are used unexpectedly, it means we fetch not fresh
q-data.json
that may have been already changed in server side.So I expanded the use of that options to the cases other than the
opts.cacheClear
is set, to allGET
request as well.Checklist:
pnpm change
and documented my changes