Author: doogie
Date: Thu Apr 1 04:24:28 2010 New Revision: 929806 URL: http://svn.apache.org/viewvc?rev=929806&view=rev Log: Remove default values from cache.properties. Since the default setting in the file was to set soft reference to false, if some code explicitly called create, requesting soft reference, it would be overridden by the setting in the file. Modified: ofbiz/trunk/framework/base/config/cache.properties ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/test/UtilCacheTests.java Modified: ofbiz/trunk/framework/base/config/cache.properties URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/config/cache.properties?rev=929806&r1=929805&r2=929806&view=diff ============================================================================== --- ofbiz/trunk/framework/base/config/cache.properties (original) +++ ofbiz/trunk/framework/base/config/cache.properties Thu Apr 1 04:24:28 2010 @@ -22,10 +22,10 @@ #### # Default Settings -cache.file.store=runtime/data/utilcache -default.maxSize=0 -default.expireTime=0 -default.useSoftReference=false +#cache.file.store=runtime/data/utilcache +#default.maxSize=0 +#default.expireTime=0 +#default.useSoftReference=false # No maxSize for properties.UtilPropertiesResourceCache properties.UtilPropertiesResourceCache.maxSize=0 Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java?rev=929806&r1=929805&r2=929806&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java Thu Apr 1 04:24:28 2010 @@ -208,6 +208,7 @@ public class UtilCache<K, V> implements if (value != null) { fileStore = value; } + } catch (MissingResourceException e) { } catch (Exception e) { Debug.logWarning(e, "Error getting cache.file.store value from cache.properties file for propNames: " + propNames, module); } Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/test/UtilCacheTests.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/test/UtilCacheTests.java?rev=929806&r1=929805&r2=929806&view=diff ============================================================================== --- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/test/UtilCacheTests.java (original) +++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/test/UtilCacheTests.java Thu Apr 1 04:24:28 2010 @@ -189,7 +189,7 @@ public class UtilCacheTests extends Gene assertUtilCacheSettings(UtilCache.createUtilCache(), null, null, null, null, null); assertUtilCacheSettings(UtilCache.createUtilCache(name), null, null, null, null, null); assertUtilCacheSettings(UtilCache.createUtilCache(name, false), null, null, null, Boolean.FALSE, null); - //assertUtilCacheSettings(UtilCache.createUtilCache(name, true), null, null, null, Boolean.TRUE, null); + assertUtilCacheSettings(UtilCache.createUtilCache(name, true), null, null, null, Boolean.TRUE, null); assertUtilCacheSettings(UtilCache.createUtilCache(5, 15000), 5, null, 15000L, null, null); assertUtilCacheSettings(UtilCache.createUtilCache(name, 6, 16000), 6, null, 16000L, null, null); assertUtilCacheSettings(UtilCache.createUtilCache(name, 7, 17000, false), 7, null, 17000L, Boolean.FALSE, null); |
Free forum by Nabble | Edit this page |