]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Do not add in-transit store entries to the already overflowing memory cache.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 8 Feb 2011 01:53:13 +0000 (18:53 -0700)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 8 Feb 2011 01:53:13 +0000 (18:53 -0700)
src/store.cc

index e21f77d1e56703677bc58bdb884fc0e8d6e572e3..7800e461d6f501872609b297ae32f5779ae4d0a1 100644 (file)
@@ -1439,6 +1439,10 @@ StoreEntry::keepInMemory() const
     if (!Config.onoff.memory_cache_first && swap_status == SWAPOUT_DONE && refcount == 1)
         return 0;
 
+    // already kept more than allowed
+    if (mem_node::InUseCount() > store_pages_max)
+        return 0;
+
     return 1;
 }