Edited docs/cache.txt changes from [6580], removing a gross exclamation point usage in the process

git-svn-id: http://code.djangoproject.com/svn/django/trunk@6775 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2007-11-30 05:34:04 +00:00
parent 9e762f4407
commit 275cffaab1
1 changed files with 6 additions and 6 deletions

View File

@ -303,7 +303,7 @@ minutes.
Template fragment caching Template fragment caching
========================= =========================
**New in development version**. **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
@ -319,18 +319,18 @@ and the name to give the cache fragment. For example::
{% endcache %} {% endcache %}
Sometimes you might want to cache multiple copies of a fragment depending on Sometimes you might want to cache multiple copies of a fragment depending on
some dynamic data that appears inside the fragment. For example you may want a some dynamic data that appears inside the fragment. For example, you might want a
separate cached copy of the sidebar used in the previous example for every user separate cached copy of the sidebar used in the previous example for every user
of your site. This can be easily achieved by passing additional arguments to of your site. Do this by passing additional arguments to the ``{% cache %}``
the ``{% cache %}`` template tag to uniquely identify the cache fragment:: template tag to uniquely identify the cache fragment::
{% load cache %} {% load cache %}
{% cache 500 sidebar request.user.username %} {% cache 500 sidebar request.user.username %}
.. sidebar for logged in user .. .. sidebar for logged in user ..
{% endcache %} {% endcache %}
If you need more than one argument to identify the fragment that's fine, simply It's perfectly fine to specify more than one argument to identify the fragment.
pass as many arguments to ``{% cache %}`` as you need! Simply pass as many arguments to ``{% cache %}`` as you need.
The low-level cache API The low-level cache API
======================= =======================