Quantcast
Channel: WordPress.org Forums » [W3 Total Cache] Support
Viewing all articles
Browse latest Browse all 19285

Anointed on "[Plugin: W3 Total Cache] If is Evil - A way around it?"

$
0
0

In following many of the guides online, I have found that many of them rely upon using 'if' statements to allow/disallow caching of pages.

Example:

set $w3tc_rewrite 1;
if ($query_string != "") {
   set $w3tc_rewrite 0;
}
if ($http_cookie ~* "(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle)") {
        set $w3tc_rewrite 0;
}

According to Nginx this is Evil: http://wiki.nginx.org/IfIsEvil

Is there a way of writing such arguments without using the evil 'if' statement so that we don't have to slow down nginx so much?

It would be awesome if anyone can point us to a good set of rules for w3 that don't use the 'if' statements.

http://wordpress.org/plugins/w3-total-cache/


Viewing all articles
Browse latest Browse all 19285

Trending Articles