Skip to content
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 an issue where cache fails to match on Oxygen/Cloudflare #2530

Merged
merged 4 commits into from
Jul 19, 2023

Conversation

blittle
Copy link
Contributor

@blittle blittle commented Jul 19, 2023

The URL requires to be URI encoded to properly match

Description

Additional context


Before submitting the PR, please make sure you do the following:

  • Read the Contributing Guidelines
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123)
  • Update docs in this repository according to your change
  • Run yarn changeset add if this PR cause a version bump based on Keep a Changelog and adheres to Semantic Versioning

The URL requires to be URRIEncoded to properly match
@blittle blittle requested a review from wizardlyhel July 19, 2023 14:36
'@shopify/hydrogen': patch
---

Fix an issue where cache failed to match requests
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wizardlyhel I see in the H2 fix, we also directly use the URL when removing from the cache. Is that necessary?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no - I miss that. That should be just request

@wizardlyhel
Copy link
Collaborator

This needs update too https://github.com/Shopify/hydrogen-v1/blob/v1.x-2022-07/packages/hydrogen/src/foundation/Cache/cache.ts#L105-L117

make sure to set the padded cache control on response

packages/hydrogen/src/foundation/Cache/cache.ts Outdated Show resolved Hide resolved
@blittle blittle merged commit 1e6953d into v1.x-2022-07 Jul 19, 2023
7 checks passed
@blittle blittle deleted the bl-fix-cache branch July 19, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants