Cache only if no args?

p.iannelli nginx-forum at
Wed Dec 1 23:16:36 MSK 2010

Hello all,

I have a small question for you !

It is possible to cache the response from proxy_pass (that is filtered
by custom filters) _only_ if the request has no args? If the request has
arguments, it should be served from upstream and any temporary buffer

Example :

Request <-- cache it
Request <-- don't cache

All assuming that the proxy_cache_key is just the uri without params
($scheme://$http_host$uri in the specific).

So, I should have only one copy of the file in cache and should be the
"clean" one. I don't want to cache any request that is processed by my
custom filters with different cache keys.

Thank you very much :)

Kind regards,

Paolo Iannelli

Posted at Nginx Forum:,154876,154876#msg-154876

More information about the nginx mailing list