From: wessels <> Date: Mon, 23 Jun 2003 22:49:13 +0000 (+0000) Subject: Regarding store_check_cachable_stats, put check for 'wrong_content_length' X-Git-Tag: SQUID_3_0_PRE1~87 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=be3b12f05635ac50c3a48aad8e3f9831a3f488b0;p=thirdparty%2Fsquid.git Regarding store_check_cachable_stats, put check for 'wrong_content_length' before 'not_entry_cachable' because objects with ENTRY_BAD_LEGNTH also always have ENTRY_CACHABLE cleared and nothing ever gets counted as 'wrong_content_length'. --- diff --git a/src/store.cc b/src/store.cc index e57a7f476e..5822cb8813 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.567 2003/06/23 10:07:36 robertc Exp $ + * $Id: store.cc,v 1.568 2003/06/23 16:49:13 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -912,12 +912,12 @@ storeCheckCachable(StoreEntry * e) store_check_cachable_hist.no.non_get++; } else #endif - if (!EBIT_TEST(e->flags, ENTRY_CACHABLE)) { - debug(20, 2) ("storeCheckCachable: NO: not cachable\n"); - store_check_cachable_hist.no.not_entry_cachable++; - } else if (e->store_status == STORE_OK && EBIT_TEST(e->flags, ENTRY_BAD_LENGTH)) { + if (e->store_status == STORE_OK && EBIT_TEST(e->flags, ENTRY_BAD_LENGTH)) { debug(20, 2) ("storeCheckCachable: NO: wrong content-length\n"); store_check_cachable_hist.no.wrong_content_length++; + } else if (!EBIT_TEST(e->flags, ENTRY_CACHABLE)) { + debug(20, 2) ("storeCheckCachable: NO: not cachable\n"); + store_check_cachable_hist.no.not_entry_cachable++; } else if (EBIT_TEST(e->flags, ENTRY_NEGCACHED)) { debug(20, 3) ("storeCheckCachable: NO: negative cached\n"); store_check_cachable_hist.no.negative_cached++;