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 for stale-while-invalidate #204

Open
erikvanzijst opened this issue Feb 15, 2019 · 1 comment
Open

Support for stale-while-invalidate #204

erikvanzijst opened this issue Feb 15, 2019 · 1 comment

Comments

@erikvanzijst
Copy link

RFC-5861 introduces a cache-control extension "stale-while-invalidate":

When present in an HTTP response, the stale-while-revalidate Cache-
Control extension indicates that caches MAY serve the response in
which it appears after it becomes stale, up to the indicated number
of seconds.

If a cached response is served stale due to the presence of this
extension, the cache SHOULD attempt to revalidate it while still
serving stale responses (i.e., without blocking).

We're talking to a service that uses this directive, which is causing our client to log an error:

cachecontrol.controller | Ignoring unknown cache-control directive: stale-while-revalidate

AFAICT stale-while-invalidate is not an official directive and is not part of RFC-7234 (caching), but there might be value in supporting it in cachecontrol nonetheless.

@waggledans
Copy link

yeah, would be nice to have this.
My application could also use stale-if-error to improve reliability

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

No branches or pull requests

2 participants