You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2021/02/03 04:33:48 UTC
[trafficserver] branch 9.1.x updated: Do not write to the cache if
the plugin decides not to write to the cache (#7461)
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch 9.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/9.1.x by this push:
new 3e222f5 Do not write to the cache if the plugin decides not to write to the cache (#7461)
3e222f5 is described below
commit 3e222f591df7b1bb1fe82177ecfe89c22bc4650c
Author: Vijay Mamidi <vi...@yahoo.com>
AuthorDate: Tue Feb 2 14:49:16 2021 -0800
Do not write to the cache if the plugin decides not to write to the cache (#7461)
(cherry picked from commit 173ba6f4f0bee37b35c6766994d966d53c2cdd6b)
---
proxy/http/HttpTransact.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 29927b7..3f1f852 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -3254,6 +3254,8 @@ HttpTransact::HandleCacheOpenReadMiss(State *s)
does_method_effect_cache(s->method) == false || s->range_setup == RANGE_NOT_SATISFIABLE ||
s->range_setup == RANGE_NOT_HANDLED) {
s->cache_info.action = CACHE_DO_NO_ACTION;
+ } else if (s->api_server_response_no_store) { // plugin may have decided not to cache the response
+ s->cache_info.action = CACHE_DO_NO_ACTION;
} else {
s->cache_info.action = CACHE_PREPARE_TO_WRITE;
}