﻿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
4943	Cache middleware description	anonymous	nobody	"Original text:
Order of MIDDLEWARE_CLASSES

If you use CacheMiddleware, it’s important to put it in the right place within the MIDDLEWARE_CLASSES setting, because the cache middleware needs to know which headers by which to vary the cache storage. Middleware always adds something to the Vary response header when it can.

Put the CacheMiddleware after any middlewares that might add something to the Vary header. The following middlewares do so:
SessionMiddleware adds Cookie
GZipMiddleware adds Accept-Encoding


----
----
First, the list lacks LocaleMiddleware as it adds vary Accept-Language.
Second, the responce is handled by middleware in reverse order, hence CacheMiddle must be placed BEFORE any middleware that change vary header.

"		closed	Documentation	dev		fixed			Ready for checkin	0	0	0	0	0	0
