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.

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

@bertjwregeer bertjwregeer commented Apr 1, 2015

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 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?

@bertjwregeer
Copy link
Member

@bertjwregeer bertjwregeer commented Apr 1, 2015

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.

@bertjwregeer bertjwregeer merged commit a047793 into Pylons:master Apr 4, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
bertjwregeer added a commit that referenced this pull request Apr 4, 2015
Closes #189
@bertjwregeer
Copy link
Member

@bertjwregeer bertjwregeer commented Apr 4, 2015

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.