I understand that varnish caches “GET” and “HEAD” requests by default.
My backend servers fail when I do a get request that is too long, so I made them respond to POST instead of GET. This works great, but I need a reverse proxy which can be configured to cache POST responses just like GET.
Are there any reverse proxies that can cache these post requests?
Reverse proxies cache responses, not requests. In any case, it’s not realistic to cache a response to a POST request. The HTTP specification really doesn’t allow for it, since the very act of sending a POST request is supposed to invalidate any cache for that URL, and the response is non-cacheable by default. You are supposed to send a redirect as a response to the POST request if you want the response cached.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.