nic-6443 commented on code in PR #13350:
URL: https://github.com/apache/apisix/pull/13350#discussion_r3225504823


##########
apisix/plugins/proxy-cache/memory_handler.lua:
##########
@@ -170,14 +170,27 @@ local function cacheable_response(conf, ctx, cc)
         end
     end
 
-    if conf.cache_control and (cc["private"] or cc["no-store"] or 
cc["no-cache"]) then
+    -- Always honor upstream Cache-Control directives that mark the response as
+    -- non-shared/non-storable, regardless of the conf.cache_control flag. The
+    -- flag governs request-side semantics; upstream response directives are a
+    -- safety contract the application uses to mark personalized content.
+    if cc["private"] or cc["no-store"] or cc["no-cache"] then

Review Comment:
   Didn't the previous `cache_control` exist exactly to provide an option for 
users to control whether to follow upstream directives? Why remove this feature?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to