In my front page template I use the cache function like this:
{% cache 86400 my_posts %} {% get_latest_posts %} {% endcache %}
When there i
Note that the md5_constructor in the first line of Benjamin Wohlwend's example above is deprecated. Current (Nov. 2011) version is:
md5_constructor
args = hashlib.md5(u':'.join([urlquote(resolve_variable(var, context)) for var in self.vary_on]))