* WGs marked with an * asterisk has had at least one new draft made available during the last 5 days

Changeset 786


Ignore:
Timestamp:
2010-03-10 07:29:39 (5 years ago)
Author:
julian.reschke@gmx.de
Message:

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

Location:
draft-ietf-httpbis/latest
Files:
2 edited

Legend:

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

    r784 r786  
    884884      <p id="rfc.section.2.3.2.p.8">A response's age can be calculated in two entirely independent ways: </p> 
    885885      <ol> 
    886          <li>now minus date_value, if the local clock is reasonably well synchronized to the origin server's clock. If the result is negative, 
    887             the result is replaced by zero. 
     886         <li>the "apparent_age": response_time minus date_value, if the local clock is reasonably well synchronized to the origin server's 
     887            clock. If the result is negative, the result is replaced by zero. 
    888888         </li> 
    889889         <li>age_value, if all of the caches along the response path implement HTTP/1.1.</li> 
    890890      </ol> 
    891891      <div id="rfc.figure.u.4"></div>  
    892       <p>These are combined as</p>  <pre class="text">  corrected_received_age = max(now - date_value, age_value) 
     892      <p>These are combined as</p>  <pre class="text">  apparent_age = max(0, response_time - date_value); 
     893  corrected_received_age = max(apparent_age, age_value); 
    893894</pre><p id="rfc.section.2.3.2.p.10">When an Age value is received, it <em class="bcp14">MUST</em> be interpreted relative to the time the request was initiated, not the time that the response was received. 
    894895      </p> 
    895       <div id="rfc.figure.u.5"></div><pre class="text">  corrected_initial_age = corrected_received_age  
    896                           + (now - request_time) 
     896      <div id="rfc.figure.u.5"></div><pre class="text">  response_delay = response_time - request_time; 
     897  corrected_initial_age = corrected_received_age + response_delay; 
    897898</pre><p id="rfc.section.2.3.2.p.12">The current_age of a stored response can then be calculated by adding the amount of time (in seconds) since the stored response 
    898899         was last validated by the origin server to the corrected_initial_age. 
    899900      </p> 
    900       <div id="rfc.figure.u.6"></div>  
    901       <p>With these definitions, the current_age can be calculated as per:</p>  <pre class="text">  apparent_age = max(0, response_time - date_value); 
    902   corrected_received_age = max(apparent_age, age_value); 
    903   response_delay = response_time - request_time; 
    904   corrected_initial_age = corrected_received_age + response_delay; 
    905   resident_time = now - response_time; 
    906   current_age   = corrected_initial_age + resident_time; 
     901      <div id="rfc.figure.u.6"></div><pre class="text">  resident_time = now - response_time; 
     902  current_age = corrected_initial_age + resident_time; 
    907903</pre><h3 id="rfc.section.2.3.3"><a href="#rfc.section.2.3.3">2.3.3</a>&nbsp;<a id="serving.stale.responses" href="#serving.stale.responses">Serving Stale Responses</a></h3> 
    908904      <p id="rfc.section.2.3.3.p.1">A "stale" response is one that either has explicit expiry information or is allowed to have heuristic expiry calculated, but 
  • 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.