-
Notifications
You must be signed in to change notification settings - Fork 401
Add std.rfc_ttl() #4427
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
Add std.rfc_ttl() #4427
Conversation
|
this is massively welcome. But maybe we should also offer the opposite? i.e. modify the headers to match the |
Yes, some standard function to create |
walid-git
left a comment
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
e615ed2 to
be7107a
Compare
|
I have updated the PR to also allow |
|
OK with me. |
SashankBhamidi
left a comment
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.
Hi, I've had a look at your pull request and I have a few suggestions. I'm new to this codebase, so please feel free to correct me if I'm wrong.
Overall, I think this is a great addition to the std VMOD.
From the added documentation: Re-calculate the object timers (``beresp.ttl``, ``beresp.grace`` and ``beresp.keep``) based on the current state of ``beresp`` as if it had been processed by core code before ``vcl_backend_response`` was called. This does not change ``beresp.uncacheable``. This is useful to get the default ttl calculations after modifications of relevant properties like ``beresp.status``, ``beresp.http.Date``, ``beresp.http.Age`` or ``beresp.http.Cache-Control``. Documentation details polished by SashankBhamidi, thank you.
be7107a to
39a9dae
Compare
From the added documentation:
Re-calculate the object timers (
beresp.ttl,beresp.graceandberesp.grace) and cacheability status based on the current state ofberespas if it had been processed by core code beforevcl_backend_responsewas called.This is useful to get the default ttl calculations after modifications of relevant properties like
beresp.status,beresp.http.Date,beresp.http.Ageorberesp.http.Cache-Control.