Django

Code

Changeset 6308

Show
Ignore:
Timestamp:
09/15/07 13:43:49 (1 year ago)
Author:
adrian
Message:

Fixed #5284 -- Documented never_cache decorator. Thanks, xbito

Files:

Legend:

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

    r6049 r6308  
    525525precedence, and the header values will be merged correctly.) 
    526526 
     527If you want to use headers to disable caching altogether,  
     528``django.views.decorators.never_cache`` is a view decorator that adds 
     529headers to ensure the response won't be cached by browsers or other caches. Example:: 
     530 
     531    from django.views.decorators.cache import never_cache 
     532    @never_cache 
     533    def myview(request): 
     534        ... 
     535 
    527536.. _`Cache-Control spec`: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 
    528537