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

Improve cache busting via Refresh button #6756

Merged
merged 3 commits into from
May 3, 2024

Conversation

emallson
Copy link
Collaborator

@emallson emallson commented May 3, 2024

Part of the v2 server migration greatly improved the use of caching and cache-control headers on the server. This had the side-effect of revealing some issues with our cache-busting method. Specifically: if you bust the cache by setting a query param, the new response is stored under a new URL. But when you refresh the page the old response under the old URL is read.

This PR changes the cache-busting method to use the cache-control header via the cache parameter of fetch. When set to reload, the behavior is:

The browser fetches the resource from the remote server without first looking in the cache, but then will update the cache with the downloaded resource.

per MDN.

While I was working on this, I realized that we can't retrieve Awakened parses on the character parses page due to how the partitions are set up on WCL. I worked around it since we don't really support old seasons' logs anyway.

This requires this PR on the backend.

emallson added 3 commits May 3, 2024 16:14
rankings

this fixes an issue with character parses for awakened raids, which do
not include the awakened ranks in the "All" partition that is selected
by default
Copy link

sentry-io bot commented May 3, 2024

🔍 Existing Issues For Review

Your pull request is modifying functions with the following pre-existing issues:

📄 File: src/common/fetchWclApi.ts

Function Unhandled Issue
toJson sL: No error message toJson(src/common/fetchWclApi)
Event Count: 3 Affected Users: 4
toJson sL: No error message ExtendableError(es6-error/es...
Event Count: 1 Affected Users: 1

Did you find this useful? React with a 👍 or 👎

}

const ZONES: Zone[] = [
{
id: 31,
name: 'Vault of the Incarnates',
frozen: false,
partition: 4,
Copy link
Contributor

Choose a reason for hiding this comment

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

Back to partitions mattering! Woo!

@emallson emallson added this pull request to the merge queue May 3, 2024
Merged via the queue into WoWAnalyzer:dragonflight with commit d342961 May 3, 2024
16 checks passed
emallson added a commit to emallson/WoWAnalyzer that referenced this pull request May 6, 2024
* use `cache` param instead of query param to skip cache

* support setting specific partitions for zones when loading character
rankings

this fixes an issue with character parses for awakened raids, which do
not include the awakened ranks in the "All" partition that is selected
by default

* changelog entry
Copy link

sentry-io bot commented May 9, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ TypeError: Failed to fetch fetch(@sentry/utils/esm/instrument/fetch) View Issue
  • ‼️ TypeError: Failed to fetch fetch(@sentry/utils/esm/instrument/fetch) View Issue
  • ‼️ TypeError: Failed to fetch fetch(@sentry/utils/esm/instrument/fetch) View Issue
  • ‼️ TypeError: Failed to fetch fetch(@sentry/utils/esm/instrument/fetch) View Issue
  • ‼️ TypeError: Load failed toJson(src/common/fetchWclApi) View Issue

Did you find this useful? React with a 👍 or 👎

@emallson emallson deleted the cache-busting branch May 9, 2024 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants