Ticket #5284: never_cache_doc.diff

File never_cache_doc.diff, 764 bytes (added by Fernando Gutierrez, 17 years ago)

Patch for documentation.

  • docs/cache.txt

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