@@ -38,10 +38,12 @@ additional directives):
38
38
39
39
.. note ::
40
40
41
- Using the ``setSharedMaxAge() `` may seem equivalent to using both ``setPublic() ``
42
- and ``setMaxAge() `` methods. However, their behavior is different in a
43
- ``stale-if-error `` scenario and that's why it's recommended to use both
44
- ``public `` and ``max-age `` directives.
41
+ Using the ``setSharedMaxAge() `` method is not equivalent to using both
42
+ ``setPublic() `` and ``setMaxAge() `` methods. According to the
43
+ `Serving Stale Responses `_ section of RFC 7234, the ``s-maxage `` setting
44
+ (added by ``setSharedMaxAge() `` method) prohibits a cache to use a stale
45
+ response in ``stale-if-error `` scenarios. That's why it's recommended to use
46
+ both ``public `` and ``max-age `` directives.
45
47
46
48
.. index ::
47
49
single: Cache; Expires header
@@ -84,9 +86,10 @@ servers should not send ``Expires`` dates more than one year in the future."
84
86
85
87
.. note ::
86
88
87
- According to ` RFC 7234 - Caching `_, the `` Expires `` header value is ignored
88
- when the ``s-maxage `` or ``max-age `` directive of the `` Cache-Control ``
89
- header is defined.
89
+ According to the ` Calculating Freshness Lifetime `_ section of RFC 7234,
90
+ the `` Expires `` header value is ignored when the ``s-maxage `` or ``max-age ``
91
+ directive of the `` Cache-Control `` header is defined.
90
92
91
93
.. _`expiration model` : https://tools.ietf.org/html/rfc2616#section-13.2
92
- .. _`RFC 7234 - Caching` : https://tools.ietf.org/html/rfc7234#section-4.2.1
94
+ .. _`Calculating Freshness Lifetime` : https://tools.ietf.org/html/rfc7234#section-4.2.1
95
+ .. _`Serving Stale Responses` : https://tools.ietf.org/html/rfc7234#section-4.2.4
0 commit comments