[TYPO3-mvc] Flash Messages get persisted among page hits
Sebastian Kurfürst
sebastian at typo3.org
Wed Apr 21 19:22:36 CEST 2010
Hey Felix,
> The dispatcher calls $flashMessages->persist(), which stores the
> flashmessages to the session. That's mostly, why I think this behaviour
> is intended. *g*
Well, it depends how you look at it.
In fact, a flash message on page A *should* be persisted and displayed
at the next page rendering.
So, if you add a flash message in a controller and render the page, it
will display the flash message --> and nothing is stored in the session.
If you add a flash message and then do an external redirect, it has to
be stored in the session until the next request. That is what's
happening in the dispatcher.
Right now, there are two problem cases we need to discuss further:
a) If the flash message output element is not displayed on all pages,
then they "accumulate" until they are rendered -- this is weird behavior.
b) If a flash message is rendered, the cache of this page (well, the
cache for this cHash would be enough) must be invalidated; to only cache
outputs without flash-messages. Any suggestions how to clear that cache
for a single cHash? I'm not that good concerning the caching framework ;)
Greets,
Sebastian
More information about the TYPO3-project-typo3v4mvc
mailing list