﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
13894	Provide caching guidance for messages framework	Torsten Bronger	Sarah Boyce	"Upstream caching should be disabled when messages have been consumed in the current request.  I added

{{{
    if request._messages.used:
        add_never_cache_headers(response)
}}}

to ""process_response"" of !MessageMiddleware and it works nicely for me.  Doesn't it make sense to do that always, or at least, by default?

Rationale:

When the message framework is used and the messages are iterared over in the current view, this means that it is posible that they are displayed and consumed.  Thus, when the same page is retrieved next time, they won't appear, or with different content.

It is very difficult to handle this in cache-related code of that view because the messages have been generated in a previous request, which may even belong to another view.
"	Cleanup/optimization	assigned	Documentation	1.2	Normal			bronger@… Sarah Boyce Andy Miller	Accepted	0	0	0	0	0	0
