From bf8f089cafbb79bae4ecd697780156e96e1d04ac Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 14 Apr 2010 04:11:38 +0000 Subject: [PATCH] BUGFIX: Disable some permission caching for now, as it was breaking unit tests (from r98504) (from r99303) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102854 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/SiteTree.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 18bac0028..bec3732b3 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1113,9 +1113,12 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid if(isset($combinedStageResult)) { // Cache results - foreach($combinedStageResult as $id => $val) { + // TODO - Caching permissions is breaking unit tests. One possible issue + // is the cache needs to be flushed when permission on a page is changed, + // but this only solved some of the failing unit tests. Disabled for now. + /*foreach($combinedStageResult as $id => $val) { self::$cache_permissions[$typeField][$id] = $val; - } + }*/ return $combinedStageResult; } else { array();