I have a blog written in Django, and I started using the basic Django caching middleware with the file system caching backend. Unfortunately, this led to two things being cached that shouldn't have been: admin links (e.g. "Edit this post") for logged-in users and prepopulated comment forms based on cookies.
To get around that, I started using the template cache tags:
{% load cache %}
...admin links...
{% cache 500 blog_entry entry.id %}
...entry...
{% endcache %}
...comment form...
But it seemed that the whole page was still getting cached as well. How do you set up the caching system to only cache the parts of the template you explicitly set?
Edit: For the comments, if someone comments on the blog, I store their name, website, and email address in the session variables. If they come back to the site, then I prepopulate those parts of the form with that data. But that means it is possible for the caching system to cache a view with prepopulated data, which is not good.