Ticket #17119: 17119.diff

File 17119.diff, 2.0 KB (added by Calvin Spealman, 13 years ago)
  • docs/topics/cache.txt

    diff --git a/docs/topics/cache.txt b/docs/topics/cache.txt
    index 4729cab..88d859c 100644
    a b Then, add the following required settings to your Django settings file:  
    456456  the site, or some other string that is unique to this Django instance, to
    457457  prevent key collisions. Use an empty string if you don't care.
    458458
    459 The cache middleware caches every page that doesn't have GET or POST
    460 parameters. Optionally, if the :setting:`CACHE_MIDDLEWARE_ANONYMOUS_ONLY`
    461 setting is ``True``, only anonymous requests (i.e., not those made by a
    462 logged-in user) will be cached. This is a simple and effective way of disabling
    463 caching for any user-specific pages (including Django's admin interface). Note
    464 that if you use :setting:`CACHE_MIDDLEWARE_ANONYMOUS_ONLY`, you should make
    465 sure you've activated ``AuthenticationMiddleware``. The cache middleware
    466 expects that a HEAD request is answered with the same response headers as
    467 the corresponding GET request; in which case it can return a cached GET
    468 response for HEAD request.
     459The cache middleware caches every page requested by the HTTP GET or HEAD
     460methods and considers differences in URL parameters to constitute unique
     461pages to be cached separately. Optionally, if the
     462:setting:`CACHE_MIDDLEWARE_ANONYMOUS_ONLY` setting is ``True``, only anonymous
     463requests (i.e., not those made by a logged-in user) will be cached. This is a
     464simple and effective way of disabling caching for any user-specific pages
     465(including Django's admin interface). Note that if you use
     466:setting:`CACHE_MIDDLEWARE_ANONYMOUS_ONLY`, you should make sure you've
     467activated ``AuthenticationMiddleware``. The cache middleware expects that a
     468HEAD request is answered with the same response headers as the corresponding
     469GET request; in which case it can return a cached GET response for HEAD request.
    469470
    470471Additionally, the cache middleware automatically sets a few headers in each
    471472:class:`~django.http.HttpResponse`:
Back to Top