------------------------------------------------------------ revno: 13297 revision-id: squid3@treenet.co.nz-20140304104036-5d37rgstkhndckuq parent: squid3@treenet.co.nz-20140304103308-gtzp509fjkcxd3gy committer: Amos Jeffries branch nick: trunk timestamp: Tue 2014-03-04 23:40:36 +1300 message: Add debug messages indicating type/reason for HITs ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20140304104036-5d37rgstkhndckuq # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 5dcaadc511af16d23ecb98a73230f72da89c603d # timestamp: 2014-03-04 11:02:08 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140304103308-\ # gtzp509fjkcxd3gy # # Begin patch === modified file 'src/client_side_reply.cc' --- src/client_side_reply.cc 2014-01-01 19:20:49 +0000 +++ src/client_side_reply.cc 2014-03-04 10:40:36 +0000 @@ -447,8 +447,10 @@ clientReplyContext::cacheHit(StoreIOBuffer result) { /** Ignore if the HIT object is being deleted. */ - if (deleting) + if (deleting) { + debugs(88, 3, "HIT object being deleted. Ignore the HIT."); return; + } StoreEntry *e = http->storeEntry(); @@ -469,6 +471,7 @@ } if (result.length == 0) { + debugs(88, 5, "store IO buffer has no content. MISS"); /* the store couldn't get enough data from the file for us to id the * object */ @@ -527,15 +530,15 @@ } if (r->method == Http::METHOD_PURGE) { + debugs(88, 5, "PURGE gets a HIT"); removeClientStoreReference(&sc, http); e = NULL; purgeRequest(); return; } - if (e->checkNegativeHit() - && !r->flags.noCacheHack() - ) { + if (e->checkNegativeHit() && !r->flags.noCacheHack()) { + debugs(88, 5, "negative-HIT"); http->logType = LOG_TCP_NEGATIVE_HIT; sendMoreData(result); } else if (blockedHit()) { @@ -589,12 +592,14 @@ http->logType = LOG_TCP_MISS; processMiss(); } - } else if (r->conditional()) + } else if (r->conditional()) { + debugs(88, 5, "conditional HIT"); processConditional(result); - else { + } else { /* * plain ol' cache hit */ + debugs(88, 5, "plain old HIT"); #if USE_DELAY_POOLS if (e->store_status != STORE_OK)