How to cache js/css request containing a question mark?

biazus nginx-forum at
Mon Aug 31 16:57:22 UTC 2015

Please try to remove $ in the end of the expression:

something like this:

location ~ .*\.(js|css) {
expires 7d;

Also, make sure you are using args in the cache key:

proxy_cache_key		"$host$uri$is_args$args";


Posted at Nginx Forum:,261338,261339#msg-261339

More information about the nginx mailing list