Anonymous committed 4f301fb

Added note to docs/cache.txt about CACHE_MIDDLEWARE_ANONYMOUS_ONLY=True and ordering AuthenticationMiddleware. Refs #2541.

Comments (0)

Files changed (1)

 parameters. Optionally, if the ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting is
 ``True``, only anonymous requests (i.e., not those made by a logged-in user)
 will be cached. This is a simple and effective way of disabling caching for any
-user-specific pages (include Django's admin interface).
+user-specific pages (include Django's admin interface). Note that if you use
+``CACHE_MIDDLEWARE_ANONYMOUS_ONLY``, you should make sure you've activated
+``AuthenticationMiddleware`` and that ``AuthenticationMiddleware`` appears
+before ``CacheMiddleware`` in your ``MIDDLEWARE_CLASSES``.
 Additionally, ``CacheMiddleware`` automatically sets a few headers in each