I've got a small snippet that I want in my sidebar. The snippet will be visible on each page, and while cheap to fetch (about 50ms on my super-slow netbook!), will change so infrequently that I'd quite like to cache it (partly because I've yet to use Django's cache framework, and I'd like to learn).
I'm not sure what the best way to go here is - middleware or a custom template tag? I'm not sure how easy it would be to implement caching with these approaches. This is such a standard thing to want to do (that is, fragment caching of a fragment visible on each page) that I'm sure there's a Djangonic way to do it, but I can't find what it is.
How do you do it?