Skip to content

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

Merged
digitalresistor merged 1 commit into
Pylons:masterfrom
dstufft:support-stale
Apr 4, 2015
Merged

Support stale-while-revalidate and stale-if-error#189
digitalresistor merged 1 commit into
Pylons:masterfrom
dstufft:support-stale

Conversation

@dstufft

@dstufft dstufft commented Mar 28, 2015

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

dstufft commented Apr 1, 2015

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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 pushed a commit that referenced this pull request Apr 4, 2015
@digitalresistor

Copy link
Copy Markdown
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