From d61df5f40840c853300d8ddad0d72a40bb3486fb Mon Sep 17 00:00:00 2001 From: Derek Hulley Date: Thu, 11 May 2006 15:52:24 +0000 Subject: [PATCH] Dropped nullPermissionCache - A node's AccessControlList is attached to the node directly now git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2849 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/cache-context.xml | 41 ------------------- config/alfresco/hibernate-context.xml | 3 -- .../PermissionsDaoComponentImpl.java | 17 +------- .../repo/importer/FileImporterTest.java | 1 - 4 files changed, 1 insertion(+), 61 deletions(-) diff --git a/config/alfresco/cache-context.xml b/config/alfresco/cache-context.xml index f40fda1024..a65d4ff7e1 100644 --- a/config/alfresco/cache-context.xml +++ b/config/alfresco/cache-context.xml @@ -25,47 +25,6 @@ - - - - - - - - - - - - - - nullPermissionCache - - - 10000 - - - false - - - - - - - - - - - - - - - - nullPermissionTransactionalCache - - - 5000 - - diff --git a/config/alfresco/hibernate-context.xml b/config/alfresco/hibernate-context.xml index e7afe02575..3c6cd954d5 100644 --- a/config/alfresco/hibernate-context.xml +++ b/config/alfresco/hibernate-context.xml @@ -95,9 +95,6 @@ - - - diff --git a/source/java/org/alfresco/repo/domain/hibernate/PermissionsDaoComponentImpl.java b/source/java/org/alfresco/repo/domain/hibernate/PermissionsDaoComponentImpl.java index 89d788d1dd..18d2dbfc06 100644 --- a/source/java/org/alfresco/repo/domain/hibernate/PermissionsDaoComponentImpl.java +++ b/source/java/org/alfresco/repo/domain/hibernate/PermissionsDaoComponentImpl.java @@ -21,7 +21,6 @@ import java.util.Collections; import java.util.HashSet; import java.util.Set; -import org.alfresco.repo.cache.SimpleCache; import org.alfresco.repo.domain.DbAccessControlEntry; import org.alfresco.repo.domain.DbAccessControlList; import org.alfresco.repo.domain.DbAuthority; @@ -62,7 +61,6 @@ public class PermissionsDaoComponentImpl extends HibernateDaoSupport implements public static final String QUERY_GET_AC_ENTRIES_FOR_PERMISSION = "permission.GetAccessControlEntriesForPermission"; private NodeDaoService nodeDaoService; - private SimpleCache nullPermissionCache; public PermissionsDaoComponentImpl() { @@ -74,11 +72,6 @@ public class PermissionsDaoComponentImpl extends HibernateDaoSupport implements this.nodeDaoService = nodeDaoService; } - public void setNullPermissionCache(SimpleCache nullPermissionCache) - { - this.nullPermissionCache = nullPermissionCache; - } - public NodePermissionEntry getPermissions(NodeRef nodeRef) { // Create the object if it is not found. @@ -86,11 +79,7 @@ public class PermissionsDaoComponentImpl extends HibernateDaoSupport implements // If the object does not exist it will repeatedly query to check its // non existence. - NodePermissionEntry npe = nullPermissionCache.get(nodeRef); - if (npe != null) - { - return npe; - } + NodePermissionEntry npe = null; DbAccessControlList acl = null; Node node = getNode(nodeRef, false); if (node != null) @@ -106,7 +95,6 @@ public class PermissionsDaoComponentImpl extends HibernateDaoSupport implements true, Collections. emptySet()); npe = snpe; - nullPermissionCache.put(nodeRef, snpe); } else { @@ -159,7 +147,6 @@ public class PermissionsDaoComponentImpl extends HibernateDaoSupport implements node.setAccessControlList(acl); NodeRef nodeRef = node.getNodeRef(); - nullPermissionCache.remove(nodeRef); // done if (logger.isDebugEnabled()) @@ -290,8 +277,6 @@ public class PermissionsDaoComponentImpl extends HibernateDaoSupport implements DbAuthority dbAuthority = getAuthority(authority, true); // set persistent objects entry = dbAccessControlList.newEntry(dbPermission, dbAuthority, allow); - // drop the entry from the null cache - nullPermissionCache.remove(nodeRef); // done if (logger.isDebugEnabled()) { diff --git a/source/java/org/alfresco/repo/importer/FileImporterTest.java b/source/java/org/alfresco/repo/importer/FileImporterTest.java index c73e96c5ba..30fa98a608 100644 --- a/source/java/org/alfresco/repo/importer/FileImporterTest.java +++ b/source/java/org/alfresco/repo/importer/FileImporterTest.java @@ -49,7 +49,6 @@ import org.alfresco.service.cmr.security.PermissionService; import org.alfresco.service.namespace.NamespaceService; import org.alfresco.service.transaction.TransactionService; import org.alfresco.util.ApplicationContextHelper; -import org.alfresco.util.TempFileProvider; import org.alfresco.util.TestWithUserUtils; import org.springframework.context.ApplicationContext;