From 777f9807a076539408d4b896b260a61bc678d1ba Mon Sep 17 00:00:00 2001 From: Vijay Mamidi Date: Fri, 29 Jan 2021 11:00:01 -0800 Subject: [PATCH] Do not write to the cache if the plugin decides not to write to the cache --- proxy/http/HttpTransact.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc index 001e364db1c..9b9e9ce7f1d 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; }