amoghyermalkar123 commented on issue #8672:
URL: https://github.com/apache/trafficserver/issues/8672#issuecomment-1104176670

   Hey, so these are the logs for a transaction where the origin server does 
gives us max-age header
   ```
   [Apr 20 16:37:47.499] [ET_NET 16] DEBUG: <HttpTransact.cc:6378 
(is_response_valid)> (http_trans) [2] [is_response_valid] No errors in response
   [Apr 20 16:37:47.499] [ET_NET 16] DEBUG: <HttpTransact.cc:3338 
(handle_response_from_parent)> (http_trans) [2] [hrfp] connection alive
   [Apr 20 16:37:47.499] [ET_NET 16] DEBUG: <HttpTransact.cc:3761 
(handle_forward_server_connection_open)> (http_trans) [2] 
[handle_forward_server_connection_open] (hfsco)
   [Apr 20 16:37:47.500] [ET_NET 16] DEBUG: <HttpTransact.cc:3762 
(handle_forward_server_connection_open)> (http_seq) [2] 
[HttpTransact::handle_server_connection_open] 
   [Apr 20 16:37:47.500] [ET_NET 16] DEBUG: <HttpSM.cc:4162 
(do_hostdb_update_if_necessary)> (http) server info = 45.126.189.10:443
   [Apr 20 16:37:47.500] [ET_NET 16] DEBUG: <HttpTransact.cc:3849 
(handle_forward_server_connection_open)> (http_trans) [2] [hfsco] cache action: 
CACHE_DO_WRITE
   [Apr 20 16:37:47.501] [ET_NET 16] DEBUG: <HttpTransact.cc:3978 
(handle_cache_operation_on_forward_server_response)> (http_trans) [2] 
[handle_cache_operation_on_forward_server_response] (hcoofsr)
   [Apr 20 16:37:47.501] [ET_NET 16] DEBUG: <HttpTransact.cc:3979 
(handle_cache_operation_on_forward_server_response)> (http_seq) [2] 
[handle_cache_operation_on_forward_server_response]
   [Apr 20 16:37:47.501] [ET_NET 16] DEBUG: <HttpTransact.cc:6058 
(is_response_cacheable)> (http_trans) [2] [is_response_cacheable] client 
permits storing
   [Apr 20 16:37:47.501] [ET_NET 16] DEBUG: <HttpTransact.cc:6081 
(is_response_cacheable)> (http_trans) [2] [is_response_cacheable] 
last_modified, expires, or max-age is required
   [Apr 20 16:37:47.502] [ET_NET 16] DEBUG: <HttpTransact.cc:3988 
(handle_cache_operation_on_forward_server_response)> (http_trans) [2] [hcoofsr] 
response is not cacheable
   [Apr 20 16:37:47.502] [ET_NET 16] DEBUG: <HttpTransact.cc:4131 
(handle_cache_operation_on_forward_server_response)> (http_trans) [2] [hcoofsr] 
response code: 200
   [Apr 20 16:37:47.503] [ET_NET 16] DEBUG: <HttpTransactHeaders.cc:438 
(calculate_document_age)> (http_age) [calculate_document_age] age_value:        
      5049
   [Apr 20 16:37:47.503] [ET_NET 16] DEBUG: <HttpTransactHeaders.cc:439 
(calculate_document_age)> (http_age) [calculate_document_age] date_value:       
      1650467618
   [Apr 20 16:37:47.503] [ET_NET 16] DEBUG: <HttpTransactHeaders.cc:440 
(calculate_document_age)> (http_age) [calculate_document_age] response_time:    
      1650472667
   [Apr 20 16:37:47.504] [ET_NET 16] DEBUG: <HttpTransactHeaders.cc:441 
(calculate_document_age)> (http_age) [calculate_document_age] now:              
      1650472667
   [Apr 20 16:37:47.504] [ET_NET 16] DEBUG: <HttpTransactHeaders.cc:442 
(calculate_document_age)> (http_age) [calculate_document_age] now (fixed):      
      1650472667
   [Apr 20 16:37:47.504] [ET_NET 16] DEBUG: <HttpTransactHeaders.cc:443 
(calculate_document_age)> (http_age) [calculate_document_age] apparent_age:     
      5049
   [Apr 20 16:37:47.505] [ET_NET 16] DEBUG: <HttpTransactHeaders.cc:444 
(calculate_document_age)> (http_age) [calculate_document_age] 
corrected_received_age: 5049
   [Apr 20 16:37:47.505] [ET_NET 16] DEBUG: <HttpTransactHeaders.cc:445 
(calculate_document_age)> (http_age) [calculate_document_age] response_delay:   
      0
   [Apr 20 16:37:47.505] [ET_NET 16] DEBUG: <HttpTransactHeaders.cc:446 
(calculate_document_age)> (http_age) [calculate_document_age] 
corrected_initial_age:  5049
   [Apr 20 16:37:47.506] [ET_NET 16] DEBUG: <HttpTransactHeaders.cc:447 
(calculate_document_age)> (http_age) [calculate_document_age] resident_time:    
      0
   [Apr 20 16:37:47.506] [ET_NET 16] DEBUG: <HttpTransactHeaders.cc:448 
(calculate_document_age)> (http_age) [calculate_document_age] current_age:      
      5049
   ```
   
   As you can see the ATS says the response is not cacheable. Whereas,
   `< cache-control: max-age=21600` we get this header from origin. We have 
configured ATS to not ignore these headers as well.
   


-- 
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