mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #2180 from open-sausages/pulls/3/versioned-cache-segmentation
ENHANCEMENT: Remove segmentation from core caches
This commit is contained in:
commit
a3a0e9cb1a
@ -441,7 +441,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
foreach($classes as $class) $cacheCanCreate[$class] = singleton($class)->canCreate();
|
||||
|
||||
// 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))));
|
||||
if($this->getRequest()->getVar('flush')) $cache->clean(Zend_Cache::CLEANING_MODE_ALL);
|
||||
$json = $cache->load($cacheKey);
|
||||
|
@ -22,7 +22,7 @@ class CMSMainTest extends FunctionalTest {
|
||||
}
|
||||
|
||||
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
|
||||
$user = $this->objFromFixture('Member', 'rootedituser');
|
||||
$user->logIn();
|
||||
|
Loading…
Reference in New Issue
Block a user