From: Henrik Nordstrom Date: Tue, 4 Aug 2009 01:38:56 +0000 (+0200) Subject: Correct flush newly fetched small objects from cache_mem X-Git-Tag: SQUID_3_2_0_1~795^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=19fdd3f3967fdc2590ded05161f98f083fda9eca;p=thirdparty%2Fsquid.git Correct flush newly fetched small objects from cache_mem --- diff --git a/src/store.cc b/src/store.cc index 1e9440e226..ec98e9dd7a 100644 --- a/src/store.cc +++ b/src/store.cc @@ -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