From 3d0a36b396e1b4da9b7d5539027df96054441046 Mon Sep 17 00:00:00 2001 From: Christiaan Conover Date: Wed, 10 Jul 2013 13:35:54 -0400 Subject: [PATCH] Added exception for logged in users Exception rule to not serve cached pages if the user has a cookie value indicating that they are logged in. --- wp-ffpc-nginx-sample.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-ffpc-nginx-sample.conf b/wp-ffpc-nginx-sample.conf index 0f79d84..f7e5e2e 100644 --- a/wp-ffpc-nginx-sample.conf +++ b/wp-ffpc-nginx-sample.conf @@ -127,7 +127,10 @@ MEMCACHED_SERVERS set $memcached_request 0; } - LOGGEDIN_EXCEPTION + # don't serve cached pages if user is logged in + if ($http_cookie ~* "wordpress_logged_in_" ) { + set $memcached_request 0; + } if ( $memcached_request = 1) { memcached_pass memcached-servers;