-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[BUG] sharedMaxAge calculation problem a page with one of the s-max-age is null #18160
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
Comments
In your example what do "block A" and "block B" refer to? Can you fork the Symfony Standard Edition and make the changes that are necessary to reproduce your issue? And please also make sure that the issue persists with the latest path version of Symfony 2.3 (2.3.39 which was released yesterday). |
Thanks for providing this great reproducable example. I can confirm that the behaviour doesn't seem to be correct. Can you please check if the fix I proposed in #18164 actually fixes the problem for you? Status: Reviewed |
…ble (xabbuh) This PR was merged into the 2.3 branch. Discussion ---------- [HttpKernel] set s-maxage only if all responses are cacheable | Q | A | ------------- | --- | Branch | 2.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #18160 | License | MIT | Doc PR | Commits ------- b7d9338 set s-maxage only if all responses are cacheable
Symfony 2.3.16
PHP 5.4.41-0+deb7u1 (cli) (built: May 28 2015 18:22:26)
https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpCache/ResponseCacheStrategy.php#L79.
In the case of a page /example-1
The s-max-age injected by symfony in the response is not 0 but 86400.
Validation by test : php -r "var_dump(min(array(1,2,3,null, 0)));"
In the case of a page /example-2
The s-max-age injected by symfony in the response is 0.
Validation by test : php -r "var_dump(min(array(1,2,3, 0, null)));"
The text was updated successfully, but these errors were encountered: