175 points · by igrigorik · 14y ago · 26 comments
> Responses to this method are not cacheable, unless the response includes appropriate Cache-Control or Expires header fields.
That is, if you don't include a Cache-Control header, the response is not cacheable. Why is this even controversial? It's a bug.
For a longer, more detailed discussion with references to the RFC, see https://news.ycombinator.com/item?id=4552251 .
I would still argue that caching a POST response with max-age=0 (and no max-stale) is a bug because, while the standard technically allows it, it also technically allows the client to immediately invalidate it and immediately invalidating is the saner choice (at least, it's the choice that is going to break fewer websites).
(unfortunately we cannot see bugs opened by others)
if instead you wanted to read between the lines: please file a dupe (we have no idea when that will be fixed.) no need to file a dupe (oh cute, you're still running that ancient public build?)
Support for new cache-control directives like stale-if-error, and some kind of API for negotiating/allocating cache storage for web apps would be a good place to start, imo.
Not to get all Bladerunner here, but I've seen things you people wouldn't believe. PUTs of URI-encoded XML queries in the request URL, right up until the HTTP server says "Nope, 8K is your limit" for a start...
Or POST-only AJAX requests because an out-of-the-box install of a package wants to put 5KB of data into the URL: http://drupal.org/node/956186
...until everything goes SPDY or equivalent.