@@ -202,34 +202,39 @@ method::
202202
203203Here is a list of the main options:
204204
205- * ``default_ttl ``: The number of seconds that a cache entry should be
206- considered fresh when no explicit freshness information is provided in a
207- response. Explicit ``Cache-Control `` or ``Expires `` headers override this
208- value (default: ``0 ``);
209-
210- * ``private_headers ``: Set of request headers that trigger "private"
211- ``Cache-Control `` behavior on responses that don't explicitly state whether
212- the response is ``public `` or ``private `` via a ``Cache-Control `` directive.
213- (default: ``Authorization `` and ``Cookie ``);
214-
215- * ``allow_reload ``: Specifies whether the client can force a cache reload by
216- including a ``Cache-Control `` "no-cache" directive in the request. Set it to
217- ``true `` for compliance with RFC 2616 (default: ``false ``);
218-
219- * ``allow_revalidate ``: Specifies whether the client can force a cache
220- revalidate by including a ``Cache-Control `` "max-age=0" directive in the
221- request. Set it to ``true `` for compliance with RFC 2616 (default: false);
222-
223- * ``stale_while_revalidate ``: Specifies the default number of seconds (the
224- granularity is the second as the Response TTL precision is a second) during
225- which the cache can immediately return a stale response while it revalidates
226- it in the background (default: ``2 ``); this setting is overridden by the
227- ``stale-while-revalidate `` HTTP ``Cache-Control `` extension (see RFC 5861);
228-
229- * ``stale_if_error ``: Specifies the default number of seconds (the granularity
230- is the second) during which the cache can serve a stale response when an
231- error is encountered (default: ``60 ``). This setting is overridden by the
232- ``stale-if-error `` HTTP ``Cache-Control `` extension (see RFC 5861).
205+ ``default_ttl ``
206+ The number of seconds that a cache entry should be considered fresh when no
207+ explicit freshness information is provided in a response. Explicit
208+ ``Cache-Control `` or ``Expires `` headers override this value (default: ``0 ``).
209+
210+ ``private_headers ``
211+ Set of request headers that trigger "private" ``Cache-Control `` behavior on
212+ responses that don't explicitly state whether the response is ``public `` or
213+ ``private `` via a ``Cache-Control `` directive (default: ``Authorization ``
214+ and ``Cookie ``).
215+
216+ ``allow_reload ``
217+ Specifies whether the client can force a cache reload by including a
218+ ``Cache-Control `` "no-cache" directive in the request. Set it to ``true `` for
219+ compliance with RFC 2616 (default: ``false ``).
220+
221+ ``allow_revalidate ``
222+ Specifies whether the client can force a cache revalidate by including a
223+ ``Cache-Control `` "max-age=0" directive in the request. Set it to ``true `` for
224+ compliance with RFC 2616 (default: false).
225+
226+ ``stale_while_revalidate ``
227+ Specifies the default number of seconds (the granularity is the second as the
228+ Response TTL precision is a second) during which the cache can immediately
229+ return a stale response while it revalidates it in the background (default:
230+ ``2 ``); this setting is overridden by the ``stale-while-revalidate `` HTTP
231+ ``Cache-Control `` extension (see RFC 5861).
232+
233+ ``stale_if_error ``
234+ Specifies the default number of seconds (the granularity is the second) during
235+ which the cache can serve a stale response when an error is encountered
236+ (default: ``60 ``). This setting is overridden by the ``stale-if-error `` HTTP
237+ ``Cache-Control `` extension (see RFC 5861).
233238
234239If ``debug `` is ``true ``, Symfony automatically adds a ``X-Symfony-Cache ``
235240header to the response containing useful information about cache hits and
@@ -339,11 +344,12 @@ and then returned to every subsequent user who asked for their account page!
339344
340345To handle this situation, every response may be set to be public or private:
341346
342- * * public *: Indicates that the response may be cached by both private and
343- shared caches;
347+ *public *
348+ Indicates that the response may be cached by both private and shared caches.
344349
345- * *private *: Indicates that all or part of the response message is intended
346- for a single user and must not be cached by a shared cache.
350+ *private *
351+ Indicates that all or part of the response message is intended for a single
352+ user and must not be cached by a shared cache.
347353
348354Symfony conservatively defaults each response to be private. To take advantage
349355of shared caches (like the Symfony reverse proxy), the response will need
@@ -1033,12 +1039,14 @@ possible.
10331039
10341040The ``render_esi `` helper supports two other useful options:
10351041
1036- * ``alt ``: used as the ``alt `` attribute on the ESI tag, which allows you
1037- to specify an alternative URL to be used if the ``src `` cannot be found;
1042+ ``alt ``
1043+ Used as the ``alt `` attribute on the ESI tag, which allows you to specify an
1044+ alternative URL to be used if the ``src `` cannot be found.
10381045
1039- * ``ignore_errors ``: if set to true, an ``onerror `` attribute will be added
1040- to the ESI with a value of ``continue `` indicating that, in the event of
1041- a failure, the gateway cache will simply remove the ESI tag silently.
1046+ ``ignore_errors ``
1047+ If set to true, an ``onerror `` attribute will be added to the ESI with a value
1048+ of ``continue `` indicating that, in the event of a failure, the gateway cache
1049+ will simply remove the ESI tag silently.
10421050
10431051.. index ::
10441052 single: Cache; Invalidation
0 commit comments