Loading docs/topics/cache.txt +8 −8 Original line number Diff line number Diff line Loading @@ -465,14 +465,14 @@ Then, add the following required settings to your Django settings file: the site, or some other string that is unique to this Django instance, to prevent key collisions. Use an empty string if you don't care. The cache middleware caches GET and HEAD responses with status 200, where the request and response headers allow. Responses to requests for the same URL with different query parameters are considered to be unique pages and are cached separately. The cache middleware expects that a HEAD request is answered with the same response headers as the corresponding GET request; in which case it can return a cached GET response for HEAD request. Additionally, the cache middleware automatically sets a few headers in each ``FetchFromCacheMiddleware`` caches GET and HEAD responses with status 200, where the request and response headers allow. Responses to requests for the same URL with different query parameters are considered to be unique pages and are cached separately. This middleware expects that a HEAD request is answered with the same response headers as the corresponding GET request; in which case it can return a cached GET response for HEAD request. Additionally, ``UpdateCacheMiddleware`` automatically sets a few headers in each :class:`~django.http.HttpResponse`: * Sets the ``Last-Modified`` header to the current date/time when a fresh Loading Loading
docs/topics/cache.txt +8 −8 Original line number Diff line number Diff line Loading @@ -465,14 +465,14 @@ Then, add the following required settings to your Django settings file: the site, or some other string that is unique to this Django instance, to prevent key collisions. Use an empty string if you don't care. The cache middleware caches GET and HEAD responses with status 200, where the request and response headers allow. Responses to requests for the same URL with different query parameters are considered to be unique pages and are cached separately. The cache middleware expects that a HEAD request is answered with the same response headers as the corresponding GET request; in which case it can return a cached GET response for HEAD request. Additionally, the cache middleware automatically sets a few headers in each ``FetchFromCacheMiddleware`` caches GET and HEAD responses with status 200, where the request and response headers allow. Responses to requests for the same URL with different query parameters are considered to be unique pages and are cached separately. This middleware expects that a HEAD request is answered with the same response headers as the corresponding GET request; in which case it can return a cached GET response for HEAD request. Additionally, ``UpdateCacheMiddleware`` automatically sets a few headers in each :class:`~django.http.HttpResponse`: * Sets the ``Last-Modified`` header to the current date/time when a fresh Loading