Skip to content

Commit

Permalink
Added note to docs/cache.txt about CACHE_MIDDLEWARE_ANONYMOUS_ONLY=Tr…
Browse files Browse the repository at this point in the history
…ue and ordering AuthenticationMiddleware. Refs #2541.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3604 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Aug 18, 2006
1 parent d592ca4 commit d4a2fbb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/cache.txt
Expand Up @@ -233,7 +233,10 @@ The cache middleware caches every page that doesn't have GET or POST
parameters. Optionally, if the ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting is parameters. Optionally, if the ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting is
``True``, only anonymous requests (i.e., not those made by a logged-in user) ``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 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 Additionally, ``CacheMiddleware`` automatically sets a few headers in each
``HttpResponse``: ``HttpResponse``:
Expand Down

0 comments on commit d4a2fbb

Please sign in to comment.