Welcome! Log In Create A New Profile

Advanced

Re: nginx post response doesn't get cached

Maxim Dounin
January 03, 2013 10:48PM
Hello!

On Sat, Dec 29, 2012 at 12:46:21PM -0500, nurettin wrote:

> I'm using an old version of nginx (0.8) on centos as reverse proxy for
> caching POST requests in front of two upstream servers.
> The servers are built for receiving post requests and returning media,
> sometimes 10 MB in size.
>
> When the responses are small, nginx caches work fine. When I get a 2 MB
> response, nginx doesn't cache the POST response.
>
> I tried increasing proxy buffer size and busy buffer size but it had no
> effect, how do I cache large POST responses in nginx?

Normally responses for POST requests are not cached (even if
response indicates it is cacheable) as there is no good generic
way to construct a cache key.

If you want nginx to cache responses to POST requests, you should
instruct it to do so explicitly using the "proxy_cache_methods"
directive, e.g.

proxy_cache_methods GET HEAD POST;

See http://nginx.org/r/proxy_cache_methods.

--
Maxim Dounin
http://nginx.com/support.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx post response doesn't get cached

nurettin December 29, 2012 12:46PM

Re: nginx post response doesn't get cached

Maxim Dounin January 03, 2013 10:48PM

Re: nginx post response doesn't get cached

nurettin January 04, 2013 01:53AM

Re: nginx post response doesn't get cached

Maxim Dounin January 04, 2013 07:34AM

Re: nginx post response doesn't get cached

nurettin January 08, 2013 06:57AM

Re: nginx post response doesn't get cached

Maxim Dounin January 08, 2013 02:32PM

Re: nginx post response doesn't get cached

nurettin January 12, 2013 02:33AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 61
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready