-
Notifications
You must be signed in to change notification settings - Fork 4
/
870.txt
62 lines (47 loc) · 2.97 KB
/
870.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
[4] [[キャッシュ]]が[[応答メッセージ]]の複製を蓄積して以後の[[要求]]に答えるために使うことが認められている時、
その[[応答]]は[DFN[[RUBYB[[[キャッシュ可能]]]@en[cacheable]]]]であるといいます [SRC[>>3]]。
;; [5] ただし[[キャッシュ可能]]であるからといっていつでもその[[応答]]を使いまわせるわけではなく、
[[要求]]が色々な条件を満たす必要があります。
* 仕様書
[REFS[
- [3] [CITE@en[RFC 7230 - Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing]] ([TIME[2014-06-07 01:59:35 +09:00]] 版) <https://tools.ietf.org/html/rfc7230#page-12>
- [6] [CITE@en[RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content]] ([TIME[2014-06-07 01:55:45 +09:00]] 版) <https://tools.ietf.org/html/rfc7231#section-4.2.3>
- [9] [CITE@en[RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content]] ([TIME[2014-06-07 01:55:45 +09:00]] 版) <https://tools.ietf.org/html/rfc7231#section-6>
]REFS]
* キャッシュ可能メソッド
[7] [[応答]]を[[キャッシュ]]して再利用できる[[メソッド]]のことを、
[DFN[[RUBYB[[[キャッシュ可能]]]@en[cacheable]]]]であるといいます [SRC[>>6]]。
[8] 次の[[メソッド]]は、[[キャッシュ可能]]です [SRC[>>6]]。
[FIG(list short)[
- [CODE(HTTP)@en[[[GET]]]]
- [CODE(HTTP)@en[[[HEAD]]]]
- [CODE(HTTP)@en[[[POST]]]]
]FIG]
* 状態符号
[11] 次の[[状態符号]]は[[キャッシュ可能]]です。
[FIG(short list)[
- [CODE(HTTP)[[[200]]]]
- [CODE(HTTP)[[[203]]]]
- [CODE(HTTP)[[[204]]]]
- [CODE(HTTP)[[[300]]]]
- [CODE(HTTP)[[[301]]]]
]FIG]
[10] 未知の[[状態符号]]の[[応答]]は、[[キャッシュ]]しては[['''なりません''']] [SRC[>>9]]。
* 歴史
[2] [[RFC 2068]] は [DFN[[[cachable]]]] と綴っていましたが、
[[RFC 2616]] 以降は [DFN[[[cacheable]]]] とされています。
[FIG(quote)[
[FIGCAPTION[
[1] [[HTTP]] ([[RFC 2068]] 1.3, [[RFC 2616]] 1.3)
]FIGCAPTION]
>
:cach[INS[e]]able: A response is cach[INS[e]]able if a cache is allowed to store a copy of
the response message for use in answering subsequent requests. The
rules for determining the cach[INS[e]]ability of HTTP responses are
defined in section 13. Even if a resource is cach[INS[e]]able, there may
be additional constraints on whether a cache can use the cached
copy for a particular request.
:キャッシュ可能:[[応答]]は、[[キャッシュ]]が以後の[[要求]]に回答するのに使うためにその応答メッセージの複製を蓄積することが許されているなら、
[DFN[キャッシュ可能]]です。 HTTP 応答のキャッシュ可能性を決定する規則は13章で定義されています。
応答がキャッシュ可能であっても、特定の要求にキャッシュされた複製を使うことができるかどうかには更なる制約があるかもしれません。
]FIG]