Changeset 786 for draft-ietf-httpbis/latest
- Timestamp:
- 10/03/10 15:29:39 (12 years ago)
- Location:
- draft-ietf-httpbis/latest
- Files:
-
- 2 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 -
draft-ietf-httpbis/latest/p6-cache.xml
r784 r786 685 685 A response's age can be calculated in two entirely independent ways: 686 686 <list style="numbers"> 687 <t> nowminus date_value, if the local clock is reasonably well synchronized to the687 <t>the "apparent_age": response_time minus date_value, if the local clock is reasonably well synchronized to the 688 688 origin server's clock. If the result is negative, the result is replaced by zero.</t> 689 689 <t>age_value, if all of the caches along the response path implement HTTP/1.1.</t> … … 693 693 <preamble>These are combined as</preamble> 694 694 <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); 696 697 </artwork></figure> 697 698 <t> … … 700 701 </t> 701 702 <figure><artwork type="code"> 702 corrected_initial_age = corrected_received_age703 + (now - request_time)703 response_delay = response_time - request_time; 704 corrected_initial_age = corrected_received_age + response_delay; 704 705 </artwork></figure> 705 706 <t> … … 708 709 the corrected_initial_age. 709 710 </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"> 717 712 resident_time = now - response_time; 718 current_age 713 current_age = corrected_initial_age + resident_time; 719 714 </artwork></figure> 720 715 </section>
Note: See TracChangeset
for help on using the changeset viewer.