Ignore:
Timestamp:
Mar 10, 2010, 7:29:39 AM (10 years ago)
Author:
julian.reschke@…
Message:

re-organize field descriptions and pseudo-code for age calculation, preparing for work on #29.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • draft-ietf-httpbis/latest/p6-cache.xml

    r784 r786  
    685685  A response's age can be calculated in two entirely independent ways:
    686686  <list style="numbers">
    687     <t>now minus date_value, if the local clock is reasonably well synchronized to the
     687    <t>the "apparent_age": response_time minus date_value, if the local clock is reasonably well synchronized to the
    688688      origin server's clock. If the result is negative, the result is replaced by zero.</t>
    689689    <t>age_value, if all of the caches along the response path implement HTTP/1.1.</t>
     
    693693<preamble>These are combined as</preamble>
    694694<artwork type="code">
    695   corrected_received_age = max(now - date_value, age_value)
     695  apparent_age = max(0, response_time - date_value);
     696  corrected_received_age = max(apparent_age, age_value);
    696697</artwork></figure>
    697698<t>
     
    700701</t>
    701702<figure><artwork type="code">
    702   corrected_initial_age = corrected_received_age
    703                           + (now - request_time)
     703  response_delay = response_time - request_time;
     704  corrected_initial_age = corrected_received_age + response_delay;
    704705</artwork></figure>
    705706<t>
     
    708709  the corrected_initial_age.
    709710</t>
    710 <figure>
    711 <preamble>With these definitions, the current_age can be calculated as per:</preamble>
    712 <artwork type="code">
    713   apparent_age = max(0, response_time - date_value);
    714   corrected_received_age = max(apparent_age, age_value);
    715   response_delay = response_time - request_time;
    716   corrected_initial_age = corrected_received_age + response_delay;
     711<figure><artwork type="code">
    717712  resident_time = now - response_time;
    718   current_age   = corrected_initial_age + resident_time;
     713  current_age = corrected_initial_age + resident_time;
    719714</artwork></figure>
    720715</section>
Note: See TracChangeset for help on using the changeset viewer.