Skip to content

Commit 99e0181

Browse files
mpdudejaviereguiluz
authored andcommitted
Add a note that checking for flash messages defeats HTTP cacheability
1 parent 002e105 commit 99e0181

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

session.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,13 @@ It's common to use ``notice``, ``warning`` and ``error`` as the keys of the
265265
different types of flash messages, but you can use any key that fits your
266266
needs.
267267

268+
.. tip::
269+
270+
Accessing flash messages means that the session must be started, which
271+
in turn will cause Symfony to mark the responses as ``private``. In general,
272+
since flashes shall displayed only once, pages that might display flashes
273+
cannot reasonably be cached in HTTP caches.
274+
268275
Configuration
269276
-------------
270277

0 commit comments

Comments
 (0)