Changeset 786 for draft-ietf-httpbis/latest/p6-cache.html
- Timestamp:
- 10/03/10 15:29:39 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p6-cache.html
r784 r786 884 884 <p id="rfc.section.2.3.2.p.8">A response's age can be calculated in two entirely independent ways: </p> 885 885 <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. 888 888 </li> 889 889 <li>age_value, if all of the caches along the response path implement HTTP/1.1.</li> 890 890 </ol> 891 891 <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); 893 894 </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. 894 895 </p> 895 <div id="rfc.figure.u.5"></div><pre class="text"> corrected_initial_age = corrected_received_age896 + (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; 897 898 </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 898 899 was last validated by the origin server to the corrected_initial_age. 899 900 </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; 907 903 </pre><h3 id="rfc.section.2.3.3"><a href="#rfc.section.2.3.3">2.3.3</a> <a id="serving.stale.responses" href="#serving.stale.responses">Serving Stale Responses</a></h3> 908 904 <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
Note: See TracChangeset
for help on using the changeset viewer.