python cache library
Beaker as said is the way to go. It supports multiple backends including Memcached.
Before reinventing the wheel, I was wondering if there was a non-Django cache library that was similar to the one provided with Django. Basically, it would allow different backends (ideally, file and memcached to start) to be used just like Django's cache, and then behave identically regardless of backend used.
I've seen some libraries that are designed just for memcached but I haven't seen one that is explicitly set up to handle multiple caching systems.