Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Keep s-maxage when expiry and validation are used in combination#23130
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Keep s-maxage when expiry and validation are used in combination#23130
Uh oh!
There was an error while loading.Please reload this page.
Conversation
mpdude commentedJun 14, 2017
fabpot commentedJun 14, 2017
Should be rebased now :) |
…ould not defeat expiration on the combined response
mpdude commentedJun 14, 2017
Note to self: Don't open three different PRs at once that change the same part of code, will save yourself a lot of work. |
mpdude commentedJun 14, 2017
@fabpot rebased |
fabpot commentedJun 14, 2017
@mpdude Actually, that would have saved a lot of work for me as well :) At first, I didn't realized that the 3 PRs were about the same topic. In such a case, I generally ask to merge them all into one PR. |
mpdude commentedJun 14, 2017
I was unsure as to whether you agree that all three are bugs or correct behavior. |
fabpot commentedJun 14, 2017
Thank you@mpdude. |
…nation (mpdude)This PR was merged into the 2.7 branch.Discussion----------Keep s-maxage when expiry and validation are used in combination| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets || License | MIT| Doc PR |(Symfony) docs say that [expiration wins over validation](https://symfony.com/doc/current/http_cache/validation.html). So,a) when both the master and embedded response are public with an s-maxage, the result should be public as well and use the lower s-maxage of both, *also* in the case that the embedded response carries validation headers. (The cache may use those for revalidating the embedded response once it has become stale, but that does not impact expiration-based caching of the combined response.)b) when both the master and embedded response are public with an s-maxage, the result should be public as well and use the lower s-maxage of both, *also* in the case that the master response carries validation headers. However, those *must not* be passed on to the client: They do not apply to the combined response, but may only be used by the cache itself to revalidate the (raw) master response.Commits-------09bcbc7 Embedding a response that combines expiration and validation, that should not defeat expiration on the combined response
mpdude commentedJun 20, 2017
@fabot Could you do me a favor and merge at least 2.7 into 2.8, if your processes allow it and it is no big deal? |
fabpot commentedJun 20, 2017
@mpdude Done! |
Uh oh!
There was an error while loading.Please reload this page.
(Symfony) docs say thatexpiration wins over validation. So,
a) when both the master and embedded response are public with an s-maxage, the result should be public as well and use the lower s-maxage of both,also in the case that the embedded response carries validation headers. (The cache may use those for revalidating the embedded response once it has become stale, but that does not impact expiration-based caching of the combined response.)
b) when both the master and embedded response are public with an s-maxage, the result should be public as well and use the lower s-maxage of both,also in the case that the master response carries validation headers. However, thosemust not be passed on to the client: They do not apply to the combined response, but may only be used by the cache itself to revalidate the (raw) master response.