[ https://issues.apache.org/jira/browse/TS-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14358775#comment-14358775 ]
William Bardwell commented on TS-3331: -------------------------------------- So... {noformat} --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -198,10 +198,7 @@ is_negative_caching_appropriate(HttpTransact::State* s) case HTTP_STATUS_BAD_GATEWAY: case HTTP_STATUS_SERVICE_UNAVAILABLE: case HTTP_STATUS_GATEWAY_TIMEOUT: - return ((response_cacheable_indicated_by_cc(&s->hdr_info.server_response) >= 0) && - (HttpTransactHeaders::does_server_allow_response_to_be_stored(&s->hdr_info.server_response) || - s->cache_control.ignore_server_no_cache || - (s->cache_control.ttl_in_cache > 0))); + return true; default: break; } @@ -4263,7 +4260,7 @@ HttpTransact::handle_cache_operation_on_forward_server_response(State* s) client_response_code = server_response_code; base_response = &s->hdr_info.server_response; - s->negative_caching = is_negative_caching_appropriate(s); + s->negative_caching = is_negative_caching_appropriate(s) && cacheable; // determine the correct cache action given the original cache action, // cacheability of server response, and request method {noformat} Hum, let me see if that works... > negative responses cached even when headers indicate otherwise > -------------------------------------------------------------- > > Key: TS-3331 > URL: https://issues.apache.org/jira/browse/TS-3331 > Project: Traffic Server > Issue Type: Bug > Components: Core > Reporter: William Bardwell > Assignee: William Bardwell > Labels: review > Fix For: 5.3.0 > > > Negative type status codes get cached even when there are Cache-Control: > no-store or the like headers and positive caching would be paying attention > to that. So the fix is to apply response headers (and general caching > config) to negative caching choices too. > My patch might fix [TS-2633] 406 negative responses being cached for too long -- This message was sent by Atlassian JIRA (v6.3.4#6332)