Link: http://trac.tools.ietf.org/wg/httpbis/trac/ticket/29
Origin: http://lists.w3.org/Archives/Public/ietf-http-wg/2002JulSep/0048.html
Component: p6-cache
RFC 2616 says:
Because the request that resulted in the returned Age value must have been initiated prior to that Age value's generation, we can correct for delays imposed by the network by recording the time at which the request was initiated. Then, when an Age value is received, it MUST be interpreted relative to the time the request was initiated... So, we compute:
corrected_initial_age = corrected_received_age + (now - request_time)
I suspect the formula does not match the true intent of the RFC authors. I believe that corrected_initial_age formula counts server-to-client delays twice. It does that because the corrected_received_age component already accounts for one server-to-client delay. Here is an annotated definition from the RFC:
corrected_received_age = max( now - date_value, # trust the clock (includes server-to-client delay!) age_value) # all-HTTP/1.1 paths (no server-to-client delay)
I think it is possible to fix the corrected_initial_age formula to match the intent (note this is the *initial* not *received* age):
corrected_initial_age = max( now - date_value, # trust the clock (includes delays) age_value + now - request_time) # trust Age, add network delays
There is no need for corrected_received_age.
Moreover, it looks ALL the formulas computing current_age go away with the above new corrected_initial_age definition as long as "now" is still defined as "the current time" (i.e., the time when current_age is calculated):
current_age = corrected_initial_age
So, we end up with a single formula for all cases and all times:
current_age = max(now - date_value, age_value + now - request_time) = = now - min(date_value, request_time - age_value)
It even has a clear physical meaning -- the min() part is the conservative estimate of object creation time.
Proposal:
creation_time = min(date_value, request_time - age_value); current_age = now - creation_time;