Skip to content

Commit 7a6bec2

Browse files
committed
Reword
1 parent a04aba9 commit 7a6bec2

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

http_cache/expiration.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ additional directives):
3838
3939
.. note::
4040

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.
4547

4648
.. index::
4749
single: Cache; Expires header
@@ -84,9 +86,10 @@ servers should not send ``Expires`` dates more than one year in the future."
8486

8587
.. note::
8688

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.
9092

9193
.. _`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

Comments
 (0)