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: Link settings are not correctly read from server and display an old config - EXO-71985 #4119

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

rdenarie
Copy link
Member

Before this fix, the links settings are server with Cache-Control = must-revalidate, and maxAge = 1year must-revalidate means : if the asset is expired in cache, revalidate it against the server. Else, serve the cache content. Firefox correctly implements this behaviour as Chrome revalidate assets for each request. This behaviour means that if an admin change the configuration of the setting, a user on FF could see an old version of the configuration, until his cache is refreshed or asset expired.

The commit change the cache control to no-cache, which means : revalidate the asset for each request. As the LinkSettings endpoint correctly implements Etag feature, if the settings did not change, the service return correctly a 304 and the browser serve the cached asset. If the configuration change, the service serves the new version of the configuration.

This value is different from no-store which means no cache at all.

Resolves meeds-io/meeds#71985

…old config - EXO-71985

Before this fix, the links settings are server with Cache-Control = must-revalidate, and maxAge = 1year
must-revalidate means : if the asset is expired in cache, revalidate it against the server. Else, serve the cache content.
Firefox correctly implements this behaviour as Chrome revalidate assets for each request.
This behaviour means that if an admin change the configuration of the setting, a user on FF could see an old version of the configuration, until his cache is refreshed or asset expired.

The commit change the cache control to no-cache, which means : revalidate the asset for each request. As the LinkSettings endpoint correctly implements Etag feature, if the settings did not change, the service return correctly a 304 and the browser serve the cached asset. If the configuration change, the service serves the new version of the configuration.

This value is different from no-store which means no cache at all.

Resolves meeds-io/meeds#71985
@rdenarie rdenarie requested a review from mkrout October 16, 2024 16:20
@rdenarie
Copy link
Member Author

@boubaker It could interest you

@boubaker
Copy link
Member

@boubaker It could interest you

cool, well done 👍

Copy link

sonarcloud bot commented Oct 16, 2024

@rdenarie rdenarie merged commit 45fd6e0 into feature/maintenance Oct 16, 2024
7 checks passed
@rdenarie rdenarie deleted the fix/task-71985 branch October 16, 2024 16:35
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