TS-2195: reimplement TSHttpTxnCacheLookupSkip in terms of TSHttpTxnConfigIntSet
Replace the guts of TSHttpTxnCacheLookupSkip with TSHttpTxnConfigIntSet. This is a compatible change that makes it easy to remove TSHttpTxnCacheLookupSkip in the 5.x branch. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/1fd225ab Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/1fd225ab Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/1fd225ab Branch: refs/heads/master Commit: 1fd225ab3d164aa63a41925a91ff4e418c194b88 Parents: b61c6df Author: James Peach <[email protected]> Authored: Mon Sep 9 16:35:38 2013 -0700 Committer: James Peach <[email protected]> Committed: Mon Sep 9 16:35:38 2013 -0700 ---------------------------------------------------------------------- proxy/InkAPI.cc | 8 ++------ proxy/http/HttpTransact.cc | 3 --- proxy/http/HttpTransact.h | 2 -- 3 files changed, 2 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1fd225ab/proxy/InkAPI.cc ---------------------------------------------------------------------- diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc index 8b51218..1418826 100644 --- a/proxy/InkAPI.cc +++ b/proxy/InkAPI.cc @@ -5031,15 +5031,11 @@ TSHttpTxnNoActivityTimeoutSet(TSHttpTxn txnp, int timeout) } +// TS-2196: TSHttpTxnCacheLookupSkip will be removed in the 5.x release. TSReturnCode TSHttpTxnCacheLookupSkip(TSHttpTxn txnp) { - sdk_assert(sdk_sanity_check_txn(txnp) == TS_SUCCESS); - - HttpTransact::State *s = &(((HttpSM *) txnp)->t_state); - s->api_skip_cache_lookup = true; - - return TS_SUCCESS; + return TSHttpTxnConfigIntSet(txnp, TS_CONFIG_HTTP_CACHE_HTTP, 0); } TSReturnCode http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1fd225ab/proxy/http/HttpTransact.cc ---------------------------------------------------------------------- diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index a0c9176..01a5f76 100644 --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -5885,9 +5885,6 @@ HttpTransact::is_request_cache_lookupable(State* s) return false; } - if (s->api_skip_cache_lookup) { - return false; - } // Even with "no-cache" directive, we want to do a cache lookup // because we need to update our cached copy. // Client request "no-cache" directive is handle elsewhere: http://git-wip-us.apache.org/repos/asf/trafficserver/blob/1fd225ab/proxy/http/HttpTransact.h ---------------------------------------------------------------------- diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h index 6a66fd1..ad3152b 100644 --- a/proxy/http/HttpTransact.h +++ b/proxy/http/HttpTransact.h @@ -957,7 +957,6 @@ public: HdrHeapSDKHandle *cache_resp_hdr_heap_handle; bool api_release_server_session; bool api_cleanup_cache_read; - bool api_skip_cache_lookup; bool api_server_response_no_store; bool api_server_response_ignore; bool api_http_sm_shutdown; @@ -1068,7 +1067,6 @@ public: cache_resp_hdr_heap_handle(NULL), api_release_server_session(false), api_cleanup_cache_read(false), - api_skip_cache_lookup(false), api_server_response_no_store(false), api_server_response_ignore(false), api_http_sm_shutdown(false),
