mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR make cache header clearer (from r100732)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105632 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
eed941d42d
commit
d87964f359
@ -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>";
|
||||
|
Loading…
Reference in New Issue
Block a user