How to sort parameters in nginx cache key

Wei Chen aircw2005 at gmail.com
Tue Sep 16 21:32:41 UTC 2014


Hi:

We are experiencing low cache hit ratio in Nginx server. It turned out
that one reason is client may be sending the same requests with
parameters in different orders.

e.g.

foo?p1=a&p2=b&p3=c
foo?p2=b&p1=a&p3=c

And our cache key is set as
proxy_cache_key $uri$is_args$args;

It is not feasible to change all clients to resort their urls. Is
there any way in Nginx to address that?

Thanks,
-Wei



More information about the nginx mailing list