Changeset 1323 for draft-ietf-httpbis/latest/p6-cache.html
- Timestamp:
- 01/07/11 16:56:52 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
draft-ietf-httpbis/latest/p6-cache.html
r1321 r1323 550 550 </ul> 551 551 </li> 552 <li>1.5 <a href="#delta-seconds">Delta Seconds</a></li> 552 553 </ul> 553 554 </li> … … 740 741 <a href="#abnf.dependencies" class="smpl">pseudonym</a> = <pseudonym, defined in <a href="#Part1" id="rfc.xref.Part1.9"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#header.via" title="Via">Section 9.9</a>> 741 742 <a href="#abnf.dependencies" class="smpl">uri-host</a> = <uri-host, defined in <a href="#Part1" id="rfc.xref.Part1.10"><cite title="HTTP/1.1, part 1: URIs, Connections, and Message Parsing">[Part1]</cite></a>, <a href="p1-messaging.html#uri" title="Uniform Resource Identifiers">Section 2.7</a>> 742 </pre><h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a> <a id="caching.overview" href="#caching.overview">Cache Operation</a></h1> 743 </pre><h2 id="rfc.section.1.5"><a href="#rfc.section.1.5">1.5</a> <a id="delta-seconds" href="#delta-seconds">Delta Seconds</a></h2> 744 <p id="rfc.section.1.5.p.1">The delta-seconds rule specifies a non-negative integer, representing time in seconds.</p> 745 <div id="rfc.figure.u.3"></div><pre class="inline"><span id="rfc.iref.g.1"></span> <a href="#delta-seconds" class="smpl">delta-seconds</a> = 1*<a href="#notation" class="smpl">DIGIT</a> 746 </pre><p id="rfc.section.1.5.p.3">If an implementation receives a delta-seconds value larger than the largest positive integer it can represent, or if any of 747 its subsequent calculations overflows, it <em class="bcp14">MUST</em> consider the value to be 2147483648 (2<sup>31</sup>). Recipients parsing a delta-seconds value <em class="bcp14">SHOULD</em> use an arithmetic type of at least 31 bits of range, and senders <em class="bcp14">MUST NOT</em> send delta-seconds with a value greater than 2147483648. 748 </p> 749 <h1 id="rfc.section.2"><a href="#rfc.section.2">2.</a> <a id="caching.overview" href="#caching.overview">Cache Operation</a></h1> 743 750 <h2 id="rfc.section.2.1"><a href="#rfc.section.2.1">2.1</a> <a id="response.cacheability" href="#response.cacheability">Response Cacheability</a></h2> 744 751 <p id="rfc.section.2.1.p.1">A cache <em class="bcp14">MUST NOT</em> store a response to any request, unless: … … 834 841 algorithms, but does impose worst-case constraints on their results. 835 842 </p> 836 <div id="rfc.figure.u. 3"></div>843 <div id="rfc.figure.u.4"></div> 837 844 <p>The calculation to determine if a response is fresh is:</p> <pre class="text"> response_is_fresh = (freshness_lifetime > current_age) 838 845 </pre> <p id="rfc.section.2.3.p.6">The freshness_lifetime is defined in <a href="#calculating.freshness.lifetime" title="Calculating Freshness Lifetime">Section 2.3.1</a>; the current_age is defined in <a href="#age.calculations" title="Calculating Age">Section 2.3.2</a>. … … 918 925 </li> 919 926 </ol> 920 <div id="rfc.figure.u. 4"></div> <pre class="text"> apparent_age = max(0, response_time - date_value);927 <div id="rfc.figure.u.5"></div> <pre class="text"> apparent_age = max(0, response_time - date_value); 921 928 922 929 response_delay = response_time - request_time; 923 930 corrected_age_value = age_value + response_delay; 924 </pre> <div id="rfc.figure.u. 5"></div>931 </pre> <div id="rfc.figure.u.6"></div> 925 932 <p>These are combined as</p> <pre class="text"> corrected_initial_age = max(apparent_age, corrected_age_value); 926 933 </pre><p id="rfc.section.2.3.2.p.11">The current_age of a stored response can then be calculated by adding the amount of time (in seconds) since the stored response 927 934 was last validated by the origin server to the corrected_initial_age. 928 935 </p> 929 <div id="rfc.figure.u. 6"></div><pre class="text"> resident_time = now - response_time;936 <div id="rfc.figure.u.7"></div><pre class="text"> resident_time = now - response_time; 930 937 current_age = corrected_initial_age + resident_time; 931 938 </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> … … 1048 1055 validated at the origin server. Age values are calculated as specified in <a href="#age.calculations" title="Calculating Age">Section 2.3.2</a>. 1049 1056 </p> 1050 <div id="rfc.figure.u.7"></div><pre class="inline"><span id="rfc.iref.g.1"></span> <a href="#header.age" class="smpl">Age</a> = <a href="#rule.delta-seconds" class="smpl">delta-seconds</a> 1051 </pre><div id="rule.delta-seconds"> 1052 <p id="rfc.section.3.1.p.3"> Age field-values are non-negative integers, representing time in seconds.</p> 1053 </div> 1054 <div id="rfc.figure.u.8"></div><pre class="inline"><span id="rfc.iref.g.2"></span> <a href="#rule.delta-seconds" class="smpl">delta-seconds</a> = 1*<a href="#notation" class="smpl">DIGIT</a> 1055 </pre><p id="rfc.section.3.1.p.5">If a cache receives a value larger than the largest positive integer it can represent, or if any of its age calculations overflows, 1056 it <em class="bcp14">MUST</em> transmit an Age header field with a field-value of 2147483648 (2<sup>31</sup>). Recipients parsing the Age header field-value <em class="bcp14">SHOULD</em> use an arithmetic type of at least 31 bits of range. 1057 </p> 1058 <p id="rfc.section.3.1.p.6">The presence of an Age header field in a response implies that a response is not first-hand. However, the converse is not 1057 <div id="rfc.figure.u.8"></div><pre class="inline"><span id="rfc.iref.g.2"></span> <a href="#header.age" class="smpl">Age</a> = <a href="#delta-seconds" class="smpl">delta-seconds</a> 1058 </pre><p id="rfc.section.3.1.p.3">Age field-values are non-negative integers, representing time in seconds (see <a href="#delta-seconds" title="Delta Seconds">Section 1.5</a>). 1059 </p> 1060 <p id="rfc.section.3.1.p.4">The presence of an Age header field in a response implies that a response is not first-hand. However, the converse is not 1059 1061 true, since HTTP/1.0 caches might not implement the Age header field. 1060 1062 </p> … … 1086 1088 "no-cache" 1087 1089 / "no-store" 1088 / "max-age" "=" <a href="# rule.delta-seconds" class="smpl">delta-seconds</a>1089 / "max-stale" [ "=" <a href="# rule.delta-seconds" class="smpl">delta-seconds</a> ]1090 / "min-fresh" "=" <a href="# rule.delta-seconds" class="smpl">delta-seconds</a>1090 / "max-age" "=" <a href="#delta-seconds" class="smpl">delta-seconds</a> 1091 / "max-stale" [ "=" <a href="#delta-seconds" class="smpl">delta-seconds</a> ] 1092 / "min-fresh" "=" <a href="#delta-seconds" class="smpl">delta-seconds</a> 1091 1093 / "no-transform" 1092 1094 / "only-if-cached" … … 1158 1160 / "must-revalidate" 1159 1161 / "proxy-revalidate" 1160 / "max-age" "=" <a href="# rule.delta-seconds" class="smpl">delta-seconds</a>1161 / "s-maxage" "=" <a href="# rule.delta-seconds" class="smpl">delta-seconds</a>1162 / "max-age" "=" <a href="#delta-seconds" class="smpl">delta-seconds</a> 1163 / "s-maxage" "=" <a href="#delta-seconds" class="smpl">delta-seconds</a> 1162 1164 / <a href="#header.cache-control" class="smpl">cache-extension</a> 1163 1165 </pre><p id="rfc.section.3.2.2.p.2"> <dfn>public</dfn> <span id="rfc.iref.c.12"></span> <span id="rfc.iref.p.2"></span> … … 1755 1757 ) / ( "s-maxage=" delta-seconds ) / cache-extension 1756 1758 1757 <a href="# rule.delta-seconds" class="smpl">delta-seconds</a> = 1*DIGIT1759 <a href="#delta-seconds" class="smpl">delta-seconds</a> = 1*DIGIT 1758 1760 1759 1761 <a href="#header.pragma" class="smpl">extension-pragma</a> = token [ "=" ( token / quoted-string ) ] … … 1967 1969 </li> 1968 1970 <li> <<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/235">http://tools.ietf.org/wg/httpbis/trac/ticket/235</a>>: "Cache Invalidation only happens upon successful responses" 1971 </li> 1972 <li> <<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/282">http://tools.ietf.org/wg/httpbis/trac/ticket/282</a>>: "Recommend minimum sizes for protocol elements" 1969 1973 </li> 1970 1974 <li> <<a href="http://tools.ietf.org/wg/httpbis/trac/ticket/289">http://tools.ietf.org/wg/httpbis/trac/ticket/289</a>>: "Proxies don't 'understand' methods" … … 2019 2023 <li><tt>Grammar</tt> 2020 2024 <ul> 2021 <li><tt>Age</tt> <a href="#rfc.iref.g. 1"><b>3.1</b></a></li>2025 <li><tt>Age</tt> <a href="#rfc.iref.g.2"><b>3.1</b></a></li> 2022 2026 <li><tt>Cache-Control</tt> <a href="#rfc.iref.g.3"><b>3.2</b></a></li> 2023 2027 <li><tt>cache-extension</tt> <a href="#rfc.iref.g.4"><b>3.2</b></a></li> 2024 2028 <li><tt>cache-request-directive</tt> <a href="#rfc.iref.g.5"><b>3.2.1</b></a></li> 2025 2029 <li><tt>cache-response-directive</tt> <a href="#rfc.iref.g.6"><b>3.2.2</b></a></li> 2026 <li><tt>delta-seconds</tt> <a href="#rfc.iref.g. 2"><b>3.1</b></a></li>2030 <li><tt>delta-seconds</tt> <a href="#rfc.iref.g.1"><b>1.5</b></a></li> 2027 2031 <li><tt>Expires</tt> <a href="#rfc.iref.g.7"><b>3.3</b></a></li> 2028 2032 <li><tt>extension-pragma</tt> <a href="#rfc.iref.g.10"><b>3.4</b></a></li>
Note: See TracChangeset
for help on using the changeset viewer.