Fixed #5842 -- Marked cache template tag as "New in development version", thanks `SmileyChris`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6633 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0709c23046
commit
39f28512b9
|
@ -291,13 +291,15 @@ minutes.
|
||||||
Template fragment caching
|
Template fragment caching
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
|
**New in development version**.
|
||||||
|
|
||||||
If you're after even more control, you can also cache template fragments using
|
If you're after even more control, you can also cache template fragments using
|
||||||
the ``cache`` template tag. To give your template access to this tag, put ``{%
|
the ``cache`` template tag. To give your template access to this tag, put
|
||||||
load cache %}`` near the top of your template.
|
``{% load cache %}`` near the top of your template.
|
||||||
|
|
||||||
The ``{% cache %}`` template tag caches the contents of the block for a given
|
The ``{% cache %}`` template tag caches the contents of the block for a given
|
||||||
amount of time. It takes at least two arguments: the cache timeout, in
|
amount of time. It takes at least two arguments: the cache timeout, in seconds,
|
||||||
seconds, and the name to give the cache fragment. For example::
|
and the name to give the cache fragment. For example::
|
||||||
|
|
||||||
{% load cache %}
|
{% load cache %}
|
||||||
{% cache 500 sidebar %}
|
{% cache 500 sidebar %}
|
||||||
|
|
Loading…
Reference in New Issue