From 1614248c358797b4778e88377bd0b7c6b3ca7bd9 Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 1 Aug 2009 08:57:28 +0100 Subject: [PATCH] compressed cached pages --- core/util.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/util.inc.php b/core/util.inc.php index d4a3a560..d59be3c4 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -742,7 +742,7 @@ function _start_cache() { else { header("Content-type: text/html"); header("Last-Modified: $gmdate_mod"); - print file_get_contents($cachename); + print gzuncompress(file_get_contents($cachename)); } exit; } @@ -753,7 +753,7 @@ function _start_cache() { function _end_cache() { $_do_cache = (CACHE && !isset($_COOKIE["shm_session"]) && !isset($_COOKIE["shm_nocache"])); if($_do_cache) { - file_put_contents($cachename, ob_get_contents()); + file_put_contents($cachename, gzcompress(ob_get_contents())); } } ?>