You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by ju...@apache.org on 2013/10/07 19:21:08 UTC
svn commit: r1530005 -
/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/MembershipCache.java
Author: jukka
Date: Mon Oct 7 17:21:08 2013
New Revision: 1530005
URL: http://svn.apache.org/r1530005
Log:
JCR-3678: MembershipCache max size is hard coded to 5000
Allow the cache size to be controlled with a system property.
We can turn this into a proper repository configuration parameter
if the need to change the cache size is a common enough.
Modified:
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/MembershipCache.java
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/MembershipCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/MembershipCache.java?rev=1530005&r1=1530004&r2=1530005&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/MembershipCache.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/user/MembershipCache.java Mon Oct 7 17:21:08 2013
@@ -57,9 +57,10 @@ public class MembershipCache implements
private static final Logger log = LoggerFactory.getLogger(MembershipCache.class);
/**
- * The maximum size of this cache (TODO: make configurable)
+ * The maximum size of this cache
*/
- private static final int MAX_CACHE_SIZE = 5000;
+ private static final int MAX_CACHE_SIZE =
+ Integer.getInteger("org.apache.jackrabbit.MembershipCache", 5000);
private final SessionImpl systemSession;
private final String groupsPath;
@@ -67,7 +68,6 @@ public class MembershipCache implements
private final String pMembers;
private final ConcurrentCache<String, Collection<String>> cache;
- @SuppressWarnings("unchecked")
MembershipCache(SessionImpl systemSession, String groupsPath, boolean useMembersNode) throws RepositoryException {
this.systemSession = systemSession;
this.groupsPath = (groupsPath == null) ? UserConstants.GROUPS_PATH : groupsPath;