Skip to content
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

Support stale-while-revalidate and stale-if-error #189

Merged
merged 1 commit into from
Apr 4, 2015

Conversation

dstufft
Copy link
Contributor

@dstufft dstufft commented Mar 28, 2015

These supports the RFC 5861 extensions to cache control which allow a site to tell a HTTP cache that it's acceptable to serve a stale response while re-validating the currently cached response (stale-if-revalidate) and that it's acceptable to serve a stale response if an error occurs (stale-if-error). These both take a number of seconds for which it is acceptable to serve a stale response for.

I didn't write any tests because there doesn't seem to be any that exercise all of the various header options, if this needs tests let me know.

@digitalresistor digitalresistor added this to the Version 1.5 milestone Apr 1, 2015
@digitalresistor
Copy link
Member

Thanks :-).

Tests will need to be written eventually for all of the header options, just to make sure that as I start making changes I don't break anything.

@dstufft
Copy link
Contributor Author

dstufft commented Apr 1, 2015

Do you want me to add them to this PR for these headers or would you prefer to just do them all at the same time?

@digitalresistor
Copy link
Member

If you have the time to add tests and think you know where it is appropriate to add them, it is less work I have to do later. I was mainly adding it as a mental note on this PR for myself.

@digitalresistor digitalresistor merged commit a047793 into Pylons:master Apr 4, 2015
digitalresistor added a commit that referenced this pull request Apr 4, 2015
@digitalresistor
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants