Support RFC 5861 Cache-Control Extensions
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
[https://httpwg.org/specs/rfc5861.html](RFC 5861) extends the Cache-Control header to include two new directives for http responses, `stale-while-revalidate` and `stale-if-error`.
`stale-while-revalidate` in particular is supported by all main browsers, `stale-if-error` whilst doesn't appear to have browser support is in use by some cdns.
Currently to set either of these means having to manually play about with the Cache-Control header and/or implementing your own middleware.
### Describe the solution you'd like
It would be nice if either of these could be supported by the `ResponseCachingMiddleware` in order to signal clients how caching should be handled.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.