mozilla/datazilla — pull request #37 by carljm (2012-06-14 00:41:39+00:00)
Title: Cache wrapper

This pull request fixes the issues that cropped up last time I tried to switch to using Django's cache backend API rather than memcache.Client directly:

1. Ability to cache forever, and make this the default.
2. `.set()` returns the return value from the client library so we can error-check.

I had been thinking I'd just write our own thin cache wrapper (in order to allow global cache key prefixing, so tests can run deterministically with a clean cache), but this turned out to be even easier. It also allows us to easily swap in the compiled pylibmc in place of the pure-Python python-memcached if we ever need to squeeze more performance out of the cache.