module documentation

Undocumented

Variable register Undocumented
Class ​Cache​Node Undocumented
Function do​_cache This will cache the contents of a template fragment for a given amount of time.
register =

Undocumented

@register.tag('cache')
def do_cache(parser, token):

This will cache the contents of a template fragment for a given amount of time.

Usage:

{% load cache %}
{% cache [expire_time] [fragment_name] %}
    .. some expensive processing ..
{% endcache %}

This tag also supports varying by a list of arguments:

{% load cache %}
{% cache [expire_time] [fragment_name] [var1] [var2] .. %}
    .. some expensive processing ..
{% endcache %}

Optionally the cache to use may be specified thus:

{% cache ....  using="cachename" %}

Each unique set of arguments will result in a unique cache entry.