Welcome! Log In Create A New Profile

Advanced

Cache only if no args?

December 01, 2010 03:16PM
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 dumped.

Example :

Request http://www.example.com/image.jpg <-- cache it
Request http://www.example.com/image.jpg?lowquality=true <-- don't cache it

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
Subject Author Posted

Cache only if no args?

p.iannelli December 01, 2010 03:16PM

Re: Cache only if no args?

Igor Sysoev December 01, 2010 03:22PM

Re: Cache only if no args?

p.iannelli December 01, 2010 03:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 168
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready