From d3ae7b1d7f53ae0bda0cf4b99f65c1f735762660 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 15 Oct 2009 21:46:36 +0000 Subject: [PATCH] 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 --- static-main.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static-main.php b/static-main.php index b069b0ec440..91564aaf62c 100644 --- a/static-main.php +++ b/static-main.php @@ -14,6 +14,7 @@ */ $cacheOn = true; +$cacheDebug = false; $hostmapLocation = '../subsites/host-map.php'; if ($cacheOn) { @@ -38,10 +39,12 @@ } elseif (file_exists('../cache/'.$cacheDir.$file.'.php')) { header('X-cache: hit at '.date('r')); include_once '../cache/'.$cacheDir.$file.'.php'; + if ($cacheDebug) echo "

File was cached

"; } else { header('X-cache: miss at '.date('r') . ' on ' . $cacheDir . $file); // No cache hit... fallback!!! include 'main.php'; + if ($cacheDebug) echo "

File was !NOT! cached

"; } } else { include 'main.php';