Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Mapping non-empty $query_string (no replies)

$
0
0
Hi!
I'm running a Wordpress based website on my server, I've set up fastcgi cache recently. Now I want to get rid of evil-ifs, that are used to detect cache skipping cases, and replace them with map.

I managed to convert all common ifs except this one,

if ($query_string != "") {
set $skip_cache 1;
}

I'm trying to replace it with non-evil map in http section.

#skip cache if query string has at least one character
map $query_string $skip_cache {
"~.+" "1";
}

For some reason it doesn't work as intended. It starts bypassing cache on ALL pages except main page.

Thanks for any help.
Alex

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>