[6.x] Fix share_errors breaking nocache regions on successful responses#14729
Open
joshuablum wants to merge 2 commits into
Open
[6.x] Fix share_errors breaking nocache regions on successful responses#14729joshuablum wants to merge 2 commits into
joshuablum wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a bug where enabling
static_caching.share_errorssilently breaks{{ nocache }}regions on regular 200 responses when using half measure static caching.Affected pages log
Static cache region [...] not found on [URL]. Serving uncached response.on every request after the first, fall through to a full dynamic render, and lose the benefit of static caching. Funny thing is that the Control Panel still reports them as cached.The fix is an early return from
copyError()when$response->isSuccessful(). The shared error cache is only ever consumed byRendersHttpExceptionsfor actual 4xx/5xx exceptions, so successful responses have no reason to go through the shared error caching path.The shared error behavior for genuine error responses is unchanged.
Closes #11700.
Related: