MINOR static publisher cache debugging (from r84871)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@89156 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-10-15 21:46:36 +00:00
parent 4ab8055c29
commit d3ae7b1d7f

View File

@ -14,6 +14,7 @@
*/
$cacheOn = true;
$cacheDebug = false;
$hostmapLocation = '../subsites/host-map.php';
if ($cacheOn) {
@ -38,10 +39,12 @@ if ($cacheOn) {
} elseif (file_exists('../cache/'.$cacheDir.$file.'.php')) {
header('X-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);
// No cache hit... fallback!!!
include 'main.php';
if ($cacheDebug) echo "<h1>File was !NOT! cached</h1>";
}
} else {
include 'main.php';