From 3e335a0360e6ec02216790cfd3ef733c768a893b Mon Sep 17 00:00:00 2001 From: Vijay Mamidi Date: Wed, 18 Jul 2018 19:48:59 -0700 Subject: [PATCH] Do not do DNS to origin if the object is HIT-STALE and parent exists --- proxy/http/HttpTransact.cc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 993fec5738d..7a80980fccc 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -2322,16 +2322,7 @@ HttpTransact::HandleCacheOpenReadHitFreshness(State *s) SET_VIA_STRING(VIA_CACHE_RESULT, VIA_IN_CACHE_STALE); } - if (!s->force_dns) { // If DNS is not performed before - if (need_to_revalidate(s)) { - TRANSACT_RETURN(SM_ACTION_API_CACHE_LOOKUP_COMPLETE, - CallOSDNSLookup); // content needs to be revalidated and we did not perform a dns ....calling DNS lookup - } else { // document can be served can cache - TRANSACT_RETURN(SM_ACTION_API_CACHE_LOOKUP_COMPLETE, HttpTransact::HandleCacheOpenReadHit); - } - } else { // we have done dns . Its up to HandleCacheOpenReadHit to decide to go OS or serve from cache - TRANSACT_RETURN(SM_ACTION_API_CACHE_LOOKUP_COMPLETE, HttpTransact::HandleCacheOpenReadHit); - } + TRANSACT_RETURN(SM_ACTION_API_CACHE_LOOKUP_COMPLETE, HttpTransact::HandleCacheOpenReadHit); } ///////////////////////////////////////////////////////////////////////////////