Skip to content

Commit 0955714

Browse files
authored
Add a note that checking for flash messages defeats HTTP cacheability
1 parent 002e105 commit 0955714

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

session.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,14 @@ 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+
275+
268276
Configuration
269277
-------------
270278

0 commit comments

Comments
 (0)