﻿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
13283	CACHE_MIDDLEWARE_ANONYMOUS_ONLY kills anonymous caching efficiency	Carl Meyer	nobody	"The [http://docs.djangoproject.com/en/dev/topics/cache/#the-per-site-cache Django documention] recommends CACHE_MIDDLEWARE_ANONYMOUS_ONLY as ""a simple and effective way of disabling caching for any user-specific pages (include Django's admin interface)."" While this is strictly true, it glosses over a significant problem with using CACHE_MIDDLEWARE_ANONYMOUS_ONLY: it causes [http://code.djangoproject.com/browser/django/trunk/django/middleware/cache.py#L97 FetchFromCacheMiddleware] to check request.user, which accesses the session, which causes SessionMiddleware to set Vary: Cookie, which means that anonymous pages are cached with a session-specific key, which pretty much destroys the efficiency of caching those pages. (Bugs causing similar behavior have been fixed previously: #3586 and #6552).
"		closed	Core (Cache system)	dev		fixed	session accessed vary cookie		Accepted	1	0	0	1	0	0
