-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation] add stale while revalidate cache header #45166
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
[HttpFoundation] add stale while revalidate cache header #45166
Conversation
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
Because this is a new feature, please target 6.1 (and then you can use |
This seems backward compatible right? Isn't this meant to go to 5.x? (perhaps even lower). |
This is a new feature, so this is for 6.1. |
|
||
if (isset($options['stale_if_error'])) { | ||
$this->setStaleIfError($options['stale_if_error']); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not needed, the next foreach will do it IIUC
Ok I'll change my PR for 6.1 |
5f16138
to
76a67f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Can you update the HttpFoundation's CHANGELOG file?
e0e9849
to
3bc8119
Compare
Done for the changelog |
3bc8119
to
1be75f9
Compare
1be75f9
to
db553fb
Compare
Thank you @remilemonnier. |
This PR allow support for RFC5861.
Meaning you can now use stale_while_revalidate and stale_if_error
https://httpwg.org/specs/rfc5861.html
Very interesting doc from Fastly on the subject:
https://developer.fastly.com/learning/concepts/stale/
Link to the issue
#45036