]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Don't release memory objects which have not been stored on disk
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 4 Aug 2009 02:06:40 +0000 (04:06 +0200)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 4 Aug 2009 02:06:40 +0000 (04:06 +0200)
src/store.cc

index ec98e9dd7abb78008ad2bc41c7c67282d47afad1..2be8cc53602f5ba8ae5982b632a91257daa8469f 100644 (file)
@@ -1417,7 +1417,7 @@ StoreEntry::keepInMemory() const
     if (mem_obj->inmem_lo != 0)
        return 0;
 
-    if (!Config.onoff.memory_cache_first && refcount == 1)
+    if (!Config.onoff.memory_cache_first && swap_status == SWAPOUT_DONE && refcount == 1)
        return 0;
 
     return 1;