mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
4a3986a28c
commit
6f8f7ba90a
@ -579,6 +579,7 @@ class Versioned extends DataObjectDecorator {
|
|||||||
$_GET['stage'] = ucfirst(strtolower($_GET['stage']));
|
$_GET['stage'] = ucfirst(strtolower($_GET['stage']));
|
||||||
Session::set('currentStage', $_GET['stage']);
|
Session::set('currentStage', $_GET['stage']);
|
||||||
Session::clear('archiveDate');
|
Session::clear('archiveDate');
|
||||||
|
Cookie::set('bypassStaticCache', '1', 0);
|
||||||
}
|
}
|
||||||
if(isset($_GET['archiveDate'])) {
|
if(isset($_GET['archiveDate'])) {
|
||||||
Session::set('archiveDate', $_GET['archiveDate']);
|
Session::set('archiveDate', $_GET['archiveDate']);
|
||||||
|
@ -18,8 +18,7 @@ $cacheDebug = false;
|
|||||||
$hostmapLocation = '../subsites/host-map.php';
|
$hostmapLocation = '../subsites/host-map.php';
|
||||||
date_default_timezone_set('Pacific/Auckland');
|
date_default_timezone_set('Pacific/Auckland');
|
||||||
|
|
||||||
|
if ($cacheOn && empty($_COOKIE['bypassStaticCache'])) {
|
||||||
if ($cacheOn) {
|
|
||||||
if (file_exists($hostmapLocation)) {
|
if (file_exists($hostmapLocation)) {
|
||||||
include_once $hostmapLocation;
|
include_once $hostmapLocation;
|
||||||
$subsiteHostmap['default'] = isset($subsiteHostmap['default']) ? $subsiteHostmap['default'] : '';
|
$subsiteHostmap['default'] = isset($subsiteHostmap['default']) ? $subsiteHostmap['default'] : '';
|
||||||
|
Loading…
Reference in New Issue
Block a user