﻿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
6452	Catch 22 in Cache Documentation	pavera	nobody	"In the cache documentation it states that to cache anonymous requests only (IE you don't want to cache logged in user pages) you use CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True in the settings file.  It then states that to use this successfully !CacheMiddleware must appear after !AuthenticationMiddleware, which makes sense.  Under Order of MIDDLEWARE_CLASSES in the same document however, it says !CacheMiddleware should appear before !SessionMiddleware so that headers are set correctly, which seems to make sense to me as well.

Unfortunately, there is an already existing requirement that !AuthenticationMiddleware must come after !SessionMiddleware, so the only way to phrase this and get Django to run successfully is:

 1.  !SessionMiddleware
 1.  !AuthenticationMiddleware
 1.  !CacheMiddleware

However, that violates the documentation which states that !CacheMiddleware should come before !SessionMiddleware.

I do not know if this is an error in the documentation, or if some hacking needs to be applied to the various middlewares so that all of the requirements can be satisfied."		closed	Documentation	dev		fixed			Accepted	0	0	0	0	0	0
