mirror of https://github.com/django/django.git
Fixed #16334: Make it quite clear that cache_page's 'cache' argument refers to the name of a cache in the CACHES setting.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16815 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
4224127b54
commit
7f45651f8d
|
@ -527,9 +527,10 @@ you may expect. But once a particular URL (e.g., ``/foo/23/``) has been
|
||||||
requested, subsequent requests to that URL will use the cache.
|
requested, subsequent requests to that URL will use the cache.
|
||||||
|
|
||||||
``cache_page`` can also take an optional keyword argument, ``cache``,
|
``cache_page`` can also take an optional keyword argument, ``cache``,
|
||||||
which directs the decorator to use a specific cache alias when caching view
|
which directs the decorator to use a specific cache (from your
|
||||||
results. By default, the ``default`` alias will be used, but you can specify
|
:setting:`CACHES` setting) when caching view results. By default, the
|
||||||
any cache alias you want::
|
``default`` cache will be used, but you can specify any cache you
|
||||||
|
want::
|
||||||
|
|
||||||
@cache_page(60 * 15, cache="special_cache")
|
@cache_page(60 * 15, cache="special_cache")
|
||||||
def my_view(request):
|
def my_view(request):
|
||||||
|
|
Loading…
Reference in New Issue