File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,10 @@ The cache middleware caches every page that doesn't have GET or POST
233233parameters. Optionally, if the ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting is
234234``True``, only anonymous requests (i.e., not those made by a logged-in user)
235235will be cached. This is a simple and effective way of disabling caching for any
236- user-specific pages (include Django's admin interface).
236+ user-specific pages (include Django's admin interface). Note that if you use
237+ ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY``, you should make sure you've activated
238+ ``AuthenticationMiddleware`` and that ``AuthenticationMiddleware`` appears
239+ before ``CacheMiddleware`` in your ``MIDDLEWARE_CLASSES``.
237240
238241Additionally, ``CacheMiddleware`` automatically sets a few headers in each
239242``HttpResponse``:
You can’t perform that action at this time.
0 commit comments