Skip to content
Snippets Groups Projects
Commit 651cd3fe authored by Erick Hitter's avatar Erick Hitter
Browse files

Remove spurious whitespace from cached values to reduce validation errors and...

Remove spurious whitespace from cached values to reduce validation errors and condense output buffer interaction for simpler code.
parent a2ea63fa
Branches
No related tags found
No related merge requests found
......@@ -93,7 +93,7 @@ try {
$cache = true;
$html_of_page = $redis->get( $redis_key );
$html_of_page = trim( $redis->get( $redis_key ) );
echo $html_of_page;
// If the cache does not exist lets display the user the normal page without cache, and then fetch a new cache page
......@@ -108,8 +108,7 @@ try {
if ( ! $is_post && ! $logged_in ) {
ob_start();
require './wp-blog-header.php';
$html_of_page = ob_get_contents();
ob_end_clean();
$html_of_page = trim( ob_get_clean() );
echo $html_of_page;
if ( ! is_numeric( $seconds_cache_redis ) ) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment