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

Ensure page refreshes cause a reload when assets change #1146

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Conversation

afcapel
Copy link
Collaborator

@afcapel afcapel commented Jan 30, 2024

Fixes #1105
Fixes #1116

Copy link
Collaborator

@kevinmcconnell kevinmcconnell left a comment

Choose a reason for hiding this comment

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

Looks great. Nice that the fix was straightforward! And logically, it makes sense that the morph renderer is a type of page renderer; I think it’s expected that they would have behaviour in common.

@afcapel afcapel merged commit 063d556 into main Jan 31, 2024
2 checks passed
@afcapel afcapel deleted the stale-assets branch January 31, 2024 09:15
afcapel added a commit that referenced this pull request Feb 21, 2024
Fixes a bug introduced in #1146

`exemptPageFromPreview()` adds a `<meta>` tag to the `<head>` setting
`turbo-cache-control` to `no-preview`. However, since the MorphRenderer
now inherits from the PageRenderer, it can update meta tags in the head
and remove the `turbo-cache-control` tag. This means that the snapshot
cache will be used for the next visit, which is not what we want.

Specifying `shouldCacheSnapshot: false` in the `visit` options ensures
that the snapshot cache is not used for the refresh visit.
afcapel pushed a commit that referenced this pull request Feb 21, 2024
Fixes a bug introduced in #1146

`exemptPageFromPreview()` adds a `<meta>` tag to the `<head>` setting
`turbo-cache-control` to `no-preview`. However, since the MorphRenderer
now inherits from the PageRenderer, it can update meta tags in the head
and remove the `turbo-cache-control` tag. This means that the snapshot
cache will be used for the next visit, which is not what we want.

Specifying `shouldCacheSnapshot: false` in the `visit` options ensures
that the snapshot cache is not used for the refresh visit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants