Author: mtredinnick
Date: 2007-10-21 07:12:45 -0500 (Sun, 21 Oct 2007)
New Revision: 6575
Modified:
django/trunk/docs/cache.txt
Log:
Fixed #4493 -- Noted that the LocaleMiddleware's placement w.r.t
CacheMiddleware is important. Thanks, SmileyChris.
Modified: django/trunk/docs/cache.txt
===================================================================
--- django/trunk/docs/cache.txt 2007-10-21 04:27:22 UTC (rev 6574)
+++ django/trunk/docs/cache.txt 2007-10-21 12:12:45 UTC (rev 6575)
@@ -228,7 +228,7 @@
'django.middleware.common.CommonMiddleware',
)
-(The order of ``MIDDLEWARE_CLASSES`` matters. See "Order of MIDDLEWARE_CLASSES"
+(The order of ``MIDDLEWARE_CLASSES`` matters. See `Order of
MIDDLEWARE_CLASSES`_
below.)
Then, add the following required settings to your Django settings file:
@@ -533,7 +533,7 @@
``max_age`` in a ``cache_control`` decorator, the decorator will take
precedence, and the header values will be merged correctly.)
-If you want to use headers to disable caching altogether,
+If you want to use headers to disable caching altogether,
``django.views.decorators.never_cache`` is a view decorator that adds
headers to ensure the response won't be cached by browsers or other caches.
Example::
@@ -565,8 +565,11 @@
to know which headers by which to vary the cache storage. Middleware always
adds something to the ``Vary`` response header when it can.
-Put the ``CacheMiddleware`` after any middlewares that might add something to
-the ``Vary`` header. The following middlewares do so:
+Put the ``CacheMiddleware`` *before* any other middleware that might add
+something to the ``Vary`` header (response middleware is applied in reverse
+order). The following middleware modules do so:
* ``SessionMiddleware`` adds ``Cookie``
* ``GZipMiddleware`` adds ``Accept-Encoding``
+ * ``LocaleMiddleware`` adds ``Accept-Language``
+
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---