stampede76
stampede76

Reputation: 1631

Nginx cache ignore get variables

I have some GET variables which are used by JS elements only.

My application was fast with nginx caching but now with the get variables, there's no caching. There could be 20 to 30 different variations on a URL.

Is it possible to configure nginx so it ignores everything after the ? in the URL in regards to caching?

Upvotes: 1

Views: 135

Answers (1)

stampede76
stampede76

Reputation: 1631

Yes, just update the cachekey like:

$scheme$request_method$host$request_uri$geoip_country_code? my_get_var1=$arg_my_get_var1&my_get_var2=$arg_my_get_var2

Upvotes: 1

Related Questions