Fixed a ReST error in cache docs.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8378 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Gary Wilson Jr 2008-08-15 14:17:24 +00:00
parent a44439e880
commit 01dd602150
1 changed files with 5 additions and 4 deletions

View File

@ -231,13 +231,14 @@ arguments.
The per-site cache The per-site cache
================== ==================
**New in Django development version** (previous versions of Django only provided **New in Django development version** (previous versions of Django only
a single ``CacheMiddleware`` instead of the two pieces described below). provided a single ``CacheMiddleware`` instead of the two pieces described
below).
Once the cache is set up, the simplest way to use caching is to cache your Once the cache is set up, the simplest way to use caching is to cache your
entire site. You'll need to add entire site. You'll need to add
``'django.middleware.cache.UpdateCacheMiddleware'`` and ``'django.middleware.cache.UpdateCacheMiddleware'`` and
``'django.middleware.cache.FetchFromCacheMiddleware' to your ``'django.middleware.cache.FetchFromCacheMiddleware'`` to your
``MIDDLEWARE_CLASSES`` setting, as in this example:: ``MIDDLEWARE_CLASSES`` setting, as in this example::
MIDDLEWARE_CLASSES = ( MIDDLEWARE_CLASSES = (
@ -653,7 +654,7 @@ header. The following middleware modules do so:
* ``SessionMiddleware`` adds ``Cookie`` * ``SessionMiddleware`` adds ``Cookie``
* ``GZipMiddleware`` adds ``Accept-Encoding`` * ``GZipMiddleware`` adds ``Accept-Encoding``
* ``LocaleMiddleware`` adds ``Accept-Language`` * ``LocaleMiddleware`` adds ``Accept-Language``
``FetchFromCacheMiddleware``, on the other hand, runs during the request phase, ``FetchFromCacheMiddleware``, on the other hand, runs during the request phase,
where middleware is applied first-to-last, so an item at the top of the list where middleware is applied first-to-last, so an item at the top of the list
runs *first* during the request phase. The ``FetchFromCacheMiddleware`` also runs *first* during the request phase. The ``FetchFromCacheMiddleware`` also