Commits

chri...@81dbac14-341a-0410-aa85-cbcd92e6f43e  committed 89a984d

The other half of the tix for CACHE-118. This should get the unit tests passing again.

  • Participants
  • Parent commits 5dca471

Comments (0)

Files changed (2)

File src/core/java/com/opensymphony/oscache/base/Cache.java

         CacheEntry cacheEntry = this.getCacheEntry(key, policy, origin);
         boolean isNewEntry = cacheEntry.isNew();
 
-        // [CACHE-118] If we have a new entry, create a new CacheEntry so we can still access the old one later
+        // [CACHE-118] If we have an existing entry, create a new CacheEntry so we can still access the old one later
         if (!isNewEntry) {
             cacheEntry = new CacheEntry(key, policy);
         }

File src/core/java/com/opensymphony/oscache/base/algorithm/AbstractConcurrentReadCache.java

 
                     Object oldValue = e.value;
 
+                    // [CACHE-118] - get the old cache entry even if there's no memory cache
+                    if (persist && (oldValue == NULL)) {
+                        oldValue = persistRetrieve(key);
+                    }
+
                     if ((first == tab[index]) && (oldValue != null)) {
                         /** OpenSymphony BEGIN */