Commit f9274970 authored by Rueben Ramirez's avatar Rueben Ramirez
Browse files

cleaning up

parent 7050c484
......@@ -76,28 +76,24 @@ try {
$seconds_cache_redis = 43200;
}
// 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 ($unlimited) {
$redis->set($redis_key, $html_of_page);
}
else
{
} else {
$redis->setex($redis_key, $seconds_cache_redis, $html_of_page);
}
}
} else //either the user is logged in, or is posting a comment, show them uncached
{
} else { //either the user is logged in, or is posting a comment, show them uncached
require('./wp-blog-header.php');
}
} else if ($_SERVER['REMOTE_ADDR'] != $ip_of_your_website && strstr($current_url, 'preview=true') == true) {
require('./wp-blog-header.php');
}
// else { // This is what your server should get if no cache exists //depricated, as the ob_start() is cleaner
// else { // This is what your server should get if no cache exists //deprecated, as the ob_start() is cleaner
// require('./wp-blog-header.php');
// }
} catch (Exception $e) {
......
<?php
require('index-wp-redis.php');
//define('WP_USE_THEMES', true);
//require('./wp-blog-header.php');
?>
\ No newline at end of file
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