Permalink
Browse files

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
  • Loading branch information...
1 parent 4a3986a commit 6f8f7ba90a3e9ad1b5b2f52c17bd22f55520feed @chillu chillu committed Apr 12, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −0 core/model/Versioned.php
  2. +1 −2 static-main.php
@@ -579,6 +579,7 @@ static function choose_site_stage() {
$_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
@@ -18,8 +18,7 @@
$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'] : '';

0 comments on commit 6f8f7ba

Please sign in to comment.