masperro / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

support cache-control: max-stale and return stale responses #32

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am dealing with a fairly hostile API, that supports no caching headers
other than Date, and is quick to return 503s if used more frequently than
30-minutes intervals.

Returning stale data from the cache would help in this case.

I'd like to request "Cache-Control: max-age=3600, max-stale" and have a
stale result returned whenever the server goes 503. Currently this just
invalidates a precious (yet stale) cache.

As it is, I can do a "Cache-Control: only-if-cached" and try again in case
nothing is cached.

Original issue reported on code.google.com by tobu...@gmail.com on 10 Aug 2008 at 5:05

GoogleCodeExporter commented 8 years ago

Original comment by joe.gregorio@gmail.com on 26 Dec 2009 at 4:49