Cachetools

I was looking for a simple, off-the-shelf caching library for Python. Dissatisfied with what I could find, I wrote my own, and called it cachetools.

Cachetools provides a simple set/get interface to cache objects manually, either in-memory or to a filesystem shelve-based store; a caching decorator for functions, that indexes return values based on the sha1 hash of a pickle of the call arguments; and some logging facilities. In the future I plan to add proper expiry logic (right now it supports simple LRU, only for in-memory caches) and use SQLite as a backend, since it can easily store and index metadata for cached objects.

I'd love to hear if you find cachetools useful, or if you have any ideas for improvements.