You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2009/11/23 04:04:00 UTC

svn commit: r883226 - /ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/AbstractCache.java

Author: doogie
Date: Mon Nov 23 03:03:59 2009
New Revision: 883226

URL: http://svn.apache.org/viewvc?rev=883226&view=rev
Log:
Use getOrCreateUtilCache here too.

Modified:
    ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/AbstractCache.java

Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/AbstractCache.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/AbstractCache.java?rev=883226&r1=883225&r2=883226&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/AbstractCache.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/cache/AbstractCache.java Mon Nov 23 03:03:59 2009
@@ -49,14 +49,7 @@
     }
 
     protected UtilCache<WidgetContextCacheKey, GenericWidgetOutput> getOrCreateCache(String widgetName) {
-        synchronized (UtilCache.utilCacheTable) {
-            String name = getCacheName(widgetName);
-            UtilCache<WidgetContextCacheKey, GenericWidgetOutput> cache = UtilCache.findCache(name);
-            if (cache == null) {
-                cache = UtilCache.createUtilCache(name, 0, 0, true);
-                cache.setPropertiesParams(new String[] {name});
-            }
-            return cache;
-        }
+        String name = getCacheName(widgetName);
+        return UtilCache.getOrCreateUtilCache(widgetName, 0, 0, 0, true, false, name);
     }
 }