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

Forced refresh method #1998

Merged
merged 5 commits into from
Feb 29, 2024
Merged

Forced refresh method #1998

merged 5 commits into from
Feb 29, 2024

Conversation

dakota002
Copy link
Contributor

Resolves #1996

Still testing, the removal of the caching headers may be unnecessary

@dakota002 dakota002 requested review from lpsinger and Courey February 28, 2024 21:22
Copy link
Member

@lpsinger lpsinger left a comment

Choose a reason for hiding this comment

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

That's not what reloadDocument does. It tells React Router to bypass client side routing. Probably all you need to do is remove the cache control headers. But don't remove the canonical URL headers!

@dakota002
Copy link
Contributor Author

dakota002 commented Feb 28, 2024

That's not what reloadDocument does. It tells React Router to bypass client side routing. Probably all you need to do is remove the cache control headers. But don't remove the canonical URL headers!

I'm currently trying that but it continues to load the old version. Wouldn't we want to avoid the client side routing in this case? My thought being that we need to make the request to the server to get the new data

Edit: It behaves as expected when I include the reloadDocument, but doesn't appear to have any effect if I remove the cache control header

@dakota002 dakota002 requested a review from lpsinger February 29, 2024 15:54
@dakota002 dakota002 marked this pull request as ready for review February 29, 2024 15:54
@lpsinger
Copy link
Member

I'm currently trying that but it continues to load the old version. Wouldn't we want to avoid the client side routing in this case? My thought being that we need to make the request to the server to get the new data

No. Try this: https://remix.run/docs/en/main/route/should-revalidate

@dakota002
Copy link
Contributor Author

This now works as expected with that function added

@lpsinger lpsinger merged commit 3e6e0e1 into nasa-gcn:main Feb 29, 2024
6 checks passed
@dakota002 dakota002 deleted the ForcedRefreshMethod branch February 29, 2024 21:27
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.

Bug: Latest circular version does not display after edit, cached version is returned
2 participants