diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/cache.txt | 7 | ||||
| -rw-r--r-- | docs/faq.txt | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/docs/cache.txt b/docs/cache.txt index 2ef3d6503f..5efa2649ae 100644 --- a/docs/cache.txt +++ b/docs/cache.txt @@ -230,7 +230,12 @@ Then, add the following required settings to your Django settings file: collisions. Use an empty string if you don't care. The cache middleware caches every page that doesn't have GET or POST -parameters. Additionally, ``CacheMiddleware`` automatically sets a few headers +parameters. Optionally, If the ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting is +``True``, only anonymous requests (i.e. those node made by a logged in user) +will be cached. This is a simple and effective way of disabling caching on any +user-specific content ( include Django's admin interface). + +Additionally, ``CacheMiddleware`` automatically sets a few headers in each ``HttpResponse``: * Sets the ``Last-Modified`` header to the current date/time when a fresh diff --git a/docs/faq.txt b/docs/faq.txt index b374abfbf3..ccf8906c41 100644 --- a/docs/faq.txt +++ b/docs/faq.txt @@ -535,6 +535,14 @@ If you're sure your username and password are correct, make sure your user account has ``is_active`` and ``is_staff`` set to True. The admin site only allows access to users with those two fields both set to True. +How can I prevent the cache middleware from caching the admin site? +------------------------------------------------------------------- + +Set the ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting to ``True``. See the +`cache documentation`_ for more information. + +.. _cache documentation: ../cache/#the-per-site-cache + How do I automatically set a field's value to the user who last edited the object in the admin? ----------------------------------------------------------------------------------------------- |
