From a003b8af8ad9c3a552d5305a029685f3f5e151de Mon Sep 17 00:00:00 2001 From: Erick Hitter <ehitter@gmail.com> Date: Wed, 26 Feb 2014 12:14:43 -0800 Subject: [PATCH] Remove `require_once` calls no longer needed because logic is simplified. --- index-wp-redis.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/index-wp-redis.php b/index-wp-redis.php index 2054d68..1c2dbf8 100644 --- a/index-wp-redis.php +++ b/index-wp-redis.php @@ -190,8 +190,6 @@ try { } $redis->del( $GLOBALS['wp_redis_cache_config']['redis_key'] ); - - // require_once dirname( __FILE__ ) . '/wp-blog-header.php'; // This page is cached, the user isn't logged in, and it isn't a POST request, so let's use the cache } elseif ( ! $is_post && ! $logged_in && $redis->exists( $GLOBALS['wp_redis_cache_config']['redis_key'] ) ) { if ( $GLOBALS['wp_redis_cache_config']['debug'] ) { @@ -249,15 +247,9 @@ try { $redis->setex( $GLOBALS['wp_redis_cache_config']['redis_key'], $cache_duration, $markup_to_cache ); } } - } /*else { - require_once dirname( __FILE__ ) . '/wp-blog-header.php'; - }*/ - } /*else { - require_once dirname( __FILE__ ) . '/wp-blog-header.php'; - }*/ - } /*else { - require_once dirname( __FILE__ ) . '/wp-blog-header.php'; - }*/ + } + } + } // The current request wasn't served from cache or isn't cacheable, so we pass off to WP if ( $load_wp ) { -- GitLab