mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Remove segmentation from core caches, remove short array syntax
This commit is contained in:
parent
12826b2ace
commit
078b426786
@ -441,7 +441,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
foreach($classes as $class) $cacheCanCreate[$class] = singleton($class)->canCreate();
|
foreach($classes as $class) $cacheCanCreate[$class] = singleton($class)->canCreate();
|
||||||
|
|
||||||
// Generate basic cache key. Too complex to encompass all variations
|
// Generate basic cache key. Too complex to encompass all variations
|
||||||
$cache = SS_Cache::factory('CMSMain_SiteTreeHints');
|
$cache = SS_Cache::factory('CMSMain_SiteTreeHints', 'Output', array('disable-segmentation' => true));
|
||||||
$cacheKey = md5(implode('_', array(Member::currentUserID(), implode(',', $cacheCanCreate), implode(',', $classes))));
|
$cacheKey = md5(implode('_', array(Member::currentUserID(), implode(',', $cacheCanCreate), implode(',', $classes))));
|
||||||
if($this->getRequest()->getVar('flush')) $cache->clean(Zend_Cache::CLEANING_MODE_ALL);
|
if($this->getRequest()->getVar('flush')) $cache->clean(Zend_Cache::CLEANING_MODE_ALL);
|
||||||
$json = $cache->load($cacheKey);
|
$json = $cache->load($cacheKey);
|
||||||
|
@ -22,7 +22,7 @@ class CMSMainTest extends FunctionalTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function testSiteTreeHints() {
|
function testSiteTreeHints() {
|
||||||
$cache = SS_Cache::factory('CMSMain_SiteTreeHints');
|
$cache = SS_Cache::factory('CMSMain_SiteTreeHints', 'Output', array('disable-segmentation' => true));
|
||||||
// Login as user with root creation privileges
|
// Login as user with root creation privileges
|
||||||
$user = $this->objFromFixture('Member', 'rootedituser');
|
$user = $this->objFromFixture('Member', 'rootedituser');
|
||||||
$user->logIn();
|
$user->logIn();
|
||||||
|
Loading…
Reference in New Issue
Block a user