Author: shuber
Date: Thu Oct 18 16:15:30 2007
New Revision: 18929

URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D18929&repname=
=3Djahia
Log:
Bug fixes in max_cachedgroups_ parameter implementation

Modified:
    branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/cache/Cac=
heFactory.java
    branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/settings/SettingsB=
ean.java

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/cac=
he/CacheFactory.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/services/cache/CacheFactory.java&rev=3D1892=
9&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/cache/Cac=
heFactory.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/services/cache/Cac=
heFactory.java Thu Oct 18 16:15:30 2007
@@ -132,9 +132,12 @@
             return cache;
         }
 =

-        if(cacheLimits=3D=3Dnull) {
+        if (cacheLimits =3D=3D null) {
             cacheLimits =3D new FastHashMap(2503);
         }
+        if (cacheGroupsLimits =3D=3D null) {
+            cacheGroupsLimits =3D new FastHashMap(2503);
+        }
 =

         // instanciate the new cache, can throw an JahiaInitialization exc=
eption
         cache =3D new Cache (name, cacheProvider.newCacheImplementation(na=
me));
@@ -145,6 +148,10 @@
         } else {
             cache.setCacheLimit(freeMemoryLimit);
         }
+        if (cacheGroupsLimits.containsKey(cache.getName())) {
+            Long cacheGroupsLimit =3D (Long) cacheGroupsLimits.get(cache.g=
etName());
+            cache.setCacheGroupsLimit(cacheGroupsLimit.longValue());
+        }
         logger.debug ("Created cache instance [" + name + "]");
 =

         if (registerCache (cache)) {

Modified: branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/settings/Set=
tingsBean.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/branches/JAHIA-5-0-SP=
-BRANCH/core/src/java/org/jahia/settings/SettingsBean.java&rev=3D18929&repn=
ame=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/settings/SettingsB=
ean.java (original)
+++ branches/JAHIA-5-0-SP-BRANCH/core/src/java/org/jahia/settings/SettingsB=
ean.java Thu Oct 18 16:15:30 2007
@@ -685,7 +685,7 @@
                 String lowerKey =3D key.toLowerCase ().trim ();
                 // yes this is a max_cached value
                 if (lowerKey.indexOf ("max_cached_") =3D=3D 0) {
-                    String cacheKey =3D key.trim().substring (11);
+                    String cacheKey =3D key.trim().substring ("max_cached_=
".length());
                     String value =3D properties.getProperty (key);
                     if ((cacheKey !=3D null) && (value !=3D null)) {
                         Long maxSize =3D null;
@@ -711,7 +711,7 @@
                 String lowerKey =3D key.toLowerCase ().trim ();
                 // yes this is a max_cached value
                 if (lowerKey.indexOf ("max_cachedgroups_") =3D=3D 0) {
-                    String cacheKey =3D key.trim().substring (11);
+                    String cacheKey =3D key.trim().substring ("max_cachedg=
roups_".length());
                     String value =3D properties.getProperty (key);
                     if ((cacheKey !=3D null) && (value !=3D null)) {
                         Long maxGroupSize =3D null;

_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list

Reply via email to