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

Fixes #1945 cache race condition with multiple servers #2147

Merged
merged 5 commits into from
Dec 4, 2019

Conversation

Tabrisrp
Copy link
Contributor

@Tabrisrp Tabrisrp commented Dec 3, 2019

Prevent blank page when multiple servers are using the same shared filesystem. Instead of directly writing in the final cache file, we first write in a temp file, and rename it when it's done.

Also fixes an undetected issue with WebP and Firefox version > 66

@Tabrisrp Tabrisrp added type: bug Indicates an unexpected problem or unintended behavior severity: major module: cache module: media labels Dec 3, 2019
@Tabrisrp Tabrisrp added this to the 3.5 milestone Dec 3, 2019
@Tabrisrp Tabrisrp self-assigned this Dec 3, 2019
Copy link
Contributor

@Screenfeed Screenfeed left a comment

Choose a reason for hiding this comment

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

Nice idea for the temporary file.

inc/classes/Buffer/class-cache.php Outdated Show resolved Hide resolved
inc/classes/subscriber/Media/class-webp-subscriber.php Outdated Show resolved Hide resolved
Tabrisrp and others added 2 commits December 4, 2019 09:07
Co-Authored-By: Grégory Viguier <Screenfeed@users.noreply.github.com>
@Tabrisrp Tabrisrp merged commit 369e880 into branch-3.5 Dec 4, 2019
@Tabrisrp Tabrisrp deleted the fix/1945-cache-race-condition branch December 4, 2019 14:28
@Tabrisrp Tabrisrp linked an issue Feb 13, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: cache module: media type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache recreated on each page load when WebP Caching is enabled
3 participants