Django

Code

Changeset 6575

Show
Ignore:
Timestamp:
10/21/07 07:12:45 (1 year ago)
Author:
mtredinnick
Message:

Fixed #4493 -- Noted that the LocaleMiddleware?'s placement w.r.t
CacheMiddleware? is important. Thanks, SmileyChris?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/cache.txt

    r6572 r6575  
    229229    ) 
    230230 
    231 (The order of ``MIDDLEWARE_CLASSES`` matters. See "Order of MIDDLEWARE_CLASSES" 
     231(The order of ``MIDDLEWARE_CLASSES`` matters. See `Order of MIDDLEWARE_CLASSES`_ 
    232232below.) 
    233233 
     
    534534precedence, and the header values will be merged correctly.) 
    535535 
    536 If you want to use headers to disable caching altogether,  
     536If you want to use headers to disable caching altogether, 
    537537``django.views.decorators.never_cache`` is a view decorator that adds 
    538538headers to ensure the response won't be cached by browsers or other caches. Example:: 
     
    566566adds something to the ``Vary`` response header when it can. 
    567567 
    568 Put the ``CacheMiddleware`` after any middlewares that might add something to 
    569 the ``Vary`` header. The following middlewares do so: 
     568Put the ``CacheMiddleware`` *before* any other middleware that might add 
     569something to the ``Vary`` header (response middleware is applied in reverse 
     570order). The following middleware modules do so: 
    570571 
    571572    * ``SessionMiddleware`` adds ``Cookie`` 
    572573    * ``GZipMiddleware`` adds ``Accept-Encoding`` 
     574    * ``LocaleMiddleware`` adds ``Accept-Language`` 
     575