MINOR make cache header clearer

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100732 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Tom Rix 2010-03-09 21:58:13 +00:00 committed by Sam Minnee
parent 74293ba3d7
commit 102fc47b58

View File

@ -47,14 +47,14 @@ if ($cacheOn && empty($_COOKIE['bypassStaticCache'])) {
$file = preg_replace('/[^a-zA-Z0-9]/si', '_', $file);
if (file_exists('../cache/'.$cacheDir.$file.'.html')) {
header('X-cache: hit at '.@date('r'));
header('X-SilverStripe-Cache: hit at '.@date('r'));
echo file_get_contents('../cache/'.$cacheDir.$file.'.html');
} elseif (file_exists('../cache/'.$cacheDir.$file.'.php')) {
header('X-cache: hit at '.@date('r'));
header('X-SilverStripe-Cache: hit at '.@date('r'));
include_once '../cache/'.$cacheDir.$file.'.php';
if ($cacheDebug) echo "<h1>File was cached</h1>";
} else {
header('X-cache: miss at '.@date('r') . ' on ' . $cacheDir . $file);
header('X-SilverStripe-Cache: miss at '.@date('r') . ' on ' . $cacheDir . $file);
// No cache hit... fallback!!!
include 'main.php';
if ($cacheDebug) echo "<h1>File was !NOT! cached</h1>";