| Caching the body scares the hell out of me. If the params for the search are so many or so big that they don't fit in a single url, how could you use that as a cache key? Right now you can: * Pass the arguments as parameters * Pass them on the request body. I personally done it on apis for games in unity/ios/android for almost a decade). Other products like Elasticsearch count on that as part of the core product. * Semantically create searches in the server with POST /search In the previous two examples, you can return a redirect to the search results (like /searches/33) with perfect caching/indexing, and delegate to the server the cache algorithms. With things like Vary, Etags, Conditional fetchs, Content-Encoding, Content-Type, Cache-Control, Expires that the spec barely grasp, adding a huge body is something that a cache server/cdn will not implement. So again. What is this spec solving? |
The way many caching systems work, by hashing the body and using the hash as the cache key.