Commit 0038c5fc authored by Erick Hitter's avatar Erick Hitter

Further code cleanup

parent 0c4f0a5f
......@@ -70,7 +70,7 @@ try {
echo "<!-- using predis as a backup -->\n";
}
include_once( "wp-content/plugins/wp-redis-cache/predis5.2.php" ); //we need this to use Redis inside of PHP
include_once dirname( __FILE__ ) . '/wp-content/plugins/wp-redis-cache/predis5.2.php' ); //we need this to use Redis inside of PHP
$redis = new Predis_Client( array(
'host' => $redis_server,
'port' => $redis_port,
......@@ -123,7 +123,7 @@ try {
// When a page displays after an "HTTP 404: Not Found" error occurs, do not cache
// When the search was used, do not cache
if ( ( ! is_404() ) and ( ! is_search() ) ) {
if ( ! is_404() && ! is_search() ) {
if ( $unlimited ) {
$redis->set( $redis_key, $html_of_page );
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment