bneradt commented on code in PR #13417:
URL: https://github.com/apache/trafficserver/pull/13417#discussion_r3857707436


##########
doc/admin-guide/logging/formatting.en.rst:
##########
@@ -191,6 +193,17 @@ cccs  Proxy Cache    Cache collapsed connection success;
                      -1: collapsing was attempted but failed, request went 
upstream
                      0: collapsing was unnecessary
                      1: attempted to collapse and got a cache hit on 
subsequent read attempts
+
+cfl   Proxy Cache    Freshness limit, in seconds, for an object served from or
+                     written to cache. The limit reflects parsed cache response
+                     metadata and the effective cache configuration. The value

Review Comment:
   Updated in 2460007d79. The documentation now says the limit is calculated 
from response headers and the configured guaranteed/heuristic lifetime bounds, 
without implying that  directives such as  or  are included.



##########
doc/admin-guide/logging/formatting.en.rst:
##########
@@ -191,6 +193,17 @@ cccs  Proxy Cache    Cache collapsed connection success;
                      -1: collapsing was attempted but failed, request went 
upstream
                      0: collapsing was unnecessary
                      1: attempted to collapse and got a cache hit on 
subsequent read attempts
+
+cfl   Proxy Cache    Freshness limit, in seconds, for an object served from or
+                     written to cache. The limit reflects parsed cache response
+                     metadata and the effective cache configuration. The value

Review Comment:
   Updated in 2460007d79. The documentation now says the limit is calculated 
from response headers and the configured guaranteed/heuristic lifetime bounds, 
without implying that `cache.config` directives such as `ttl-in-cache` or 
`revalidate-after` are included.



##########
src/proxy/http/HttpTransact.cc:
##########
@@ -3059,6 +3062,7 @@ HttpTransact::build_response_from_cache(State *s, 
HTTPWarningCode warning_code)
     obj = s->cache_info.object_read;
   }
   cached_response = obj->response_get();
+  set_cache_freshness_info(s, cached_response, obj->request_sent_time_get(), 
obj->response_received_time_get(), true);

Review Comment:
   Fixed in 2460007d79. `build_response_from_cache()` now passes 
`s->request_sent_time` and `s->response_received_time`, so `cca` uses the same 
capped transaction timestamps as freshness evaluation and the Age header. This 
also avoids zero timestamps from `object_store` on the modifiable 
cached-response path.



##########
src/proxy/http/HttpTransact.cc:
##########
@@ -4835,6 +4839,7 @@ 
HttpTransact::handle_cache_operation_on_forward_server_response(State *s)
     // unset warning revalidation failed header if it set
     // (potentially added by negative revalidating)
     delete_warning_value(base_response, HTTPWarningCode::REVALIDATION_FAILED);
+    set_cache_freshness_info(s, base_response, s->request_sent_time, 
s->response_received_time, true);

Review Comment:
   Fixed in 2460007d79. The negative-revalidation early-return path now calls 
`set_cache_freshness_info()` after extending the cached response. I also added 
a replay regression that exercises a `TCP_REFRESH_FAIL_HIT` and verifies that 
`cfl` and `cca` are populated.



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