]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Correct flush newly fetched small objects from cache_mem
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 4 Aug 2009 01:38:56 +0000 (03:38 +0200)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 4 Aug 2009 01:38:56 +0000 (03:38 +0200)
src/store.cc

index 1e9440e226e3400467eb16fea661d5b2e0d4ec34..ec98e9dd7abb78008ad2bc41c7c67282d47afad1 100644 (file)
@@ -1414,7 +1414,13 @@ StoreEntry::keepInMemory() const
     if (mem_obj->data_hdr.size() == 0)
         return 0;
 
-    return mem_obj->inmem_lo == 0;
+    if (mem_obj->inmem_lo != 0)
+       return 0;
+
+    if (!Config.onoff.memory_cache_first && refcount == 1)
+       return 0;
+
+    return 1;
 }
 
 int