svn commit: r929826 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r929826 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java

doogie-3
Author: doogie
Date: Thu Apr  1 04:38:55 2010
New Revision: 929826

URL: http://svn.apache.org/viewvc?rev=929826&view=rev
Log:
setExpireTime wasn't storing new lines back to disk when the expire time
changed.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/cache/UtilCache.java

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=929826&r1=929825&r2=929826&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:38:55 2010
@@ -476,9 +476,9 @@ public class UtilCache<K, V> implements
     public void setExpireTime(long expireTime) {
         // if expire time was <= 0 and is now greater, fill expire table now
         if (this.expireTime <= 0 && expireTime > 0) {
-            long currentTime = System.currentTimeMillis();
-            for (CacheLine<V> line: cacheLineTable.values()) {
-                line.loadTime = currentTime;
+            for (K key: getCacheLineKeys()) {
+                CacheLine<V> line = getInternalNoCheck(key);
+                cacheLineTable.put(key, line.changeLine(useSoftReference, expireTime));
             }
         } else if (this.expireTime <= 0 && expireTime > 0) {
             // if expire time was > 0 and is now <=, do nothing, just leave the load times in place, won't hurt anything...