MINOR if looking at a specific stage, set a cooking to bypass static cacheing (from r91006) (from r96738)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102364 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-12 02:33:08 +00:00
parent 4a3986a28c
commit 6f8f7ba90a
2 changed files with 2 additions and 2 deletions

View File

@ -579,6 +579,7 @@ class Versioned extends DataObjectDecorator {
$_GET['stage'] = ucfirst(strtolower($_GET['stage']));
Session::set('currentStage', $_GET['stage']);
Session::clear('archiveDate');
Cookie::set('bypassStaticCache', '1', 0);
}
if(isset($_GET['archiveDate'])) {
Session::set('archiveDate', $_GET['archiveDate']);

View File

@ -18,8 +18,7 @@ $cacheDebug = false;
$hostmapLocation = '../subsites/host-map.php';
date_default_timezone_set('Pacific/Auckland');
if ($cacheOn) {
if ($cacheOn && empty($_COOKIE['bypassStaticCache'])) {
if (file_exists($hostmapLocation)) {
include_once $hostmapLocation;
$subsiteHostmap['default'] = isset($subsiteHostmap['default']) ? $subsiteHostmap['default'] : '';