masaori335 commented on issue #7425: URL: https://github.com/apache/trafficserver/issues/7425#issuecomment-760666504
Descriptions of these configs seem ambiguous when and which config should be used. - [proxy.config.http.cache.max_stale_age](https://docs.trafficserver.apache.org/en/latest/admin-guide/files/records.config.en.htm#proxy.config.http.cache.max_stale_age) > The maximum age allowed for a stale response before it cannot be cached. - [proxy.config.http.negative_revalidating_lifetime](https://docs.trafficserver.apache.org/en/latest/admin-guide/files/records.config.en.html#proxy-config-http-negative-revalidating-lifetime) > How long, in seconds, to consider a stale cached document valid if proxy.config.http.negative_revalidating_enabled is enabled and Traffic Server receives a negative (5xx only) response from the origin server during revalidation. As @fdiary pointed out, `max_stale_age` is used to check the age of cached contents. https://github.com/apache/trafficserver/blob/08fe521a3974a05b01545c68fe1bcd5162dd4fc4/proxy/http/HttpTransact.cc#L5925 OTOH, `negative_revalidating_lifetime` is only used to set the `Expires` header of stale contents. https://github.com/apache/trafficserver/blob/08fe521a3974a05b01545c68fe1bcd5162dd4fc4/proxy/http/HttpTransact.cc#L4350 If we take the doc literary, it seems like we should refer to `negative_revalidating_lifetime` too when the `negative_revalidating` is enabled. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
