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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96738 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-01-12 23:19:53 +00:00
parent d3f3178e8c
commit e8cda861e8
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'] : '';