https://www.rfc-editor.org/rfc/rfc7234#section-3
A cache MUST NOT store a response to any request, unless:
- the Authorization header field (see Section 4.2 of [RFC7235]) does not appear in the request, if the cache is shared, unless the response explicitly allows it (see Section 3.2), and
これ、「Authorization ヘッダーがある場合はいかなるレスポンスもキャッシュしてはならない」、という定義なんだな。共有キャッシュの場合( Cache-Controle: public
)でもキャッシュ不可だが、レスポンスが明確にそれを許容する場合は除外。Section 3-2 にも同じことが書いてあり、”explicitly allows it” というのは public
, must-revalidate
, s-maxage
の使用がそのような効果をもつ。 s-maxage
はそのためにあるのか…。
- replies
- 2
- announces
- 0
- likes
- 1
RFC7231の7.1.4(Vary) にも以下があり、勉強になる。
there is no need to send the Authorization field name in Vary because reuse across users is constrained by the field definition (Section 4.2 of [RFC7235])