WARNING: seemingly innocuous failing test on 1.9 for some mysterious reason.
…, you have a bigger problem
…y* weird behaviour from memcached if you add blank keys. It raises an error which is fair enough, but afterwards behaves inconsistently when returning values already in the cache. Steps to repeat: 1. Populate cache with lots of values 2. Call fetch with a zero-length key and an arbitrary value 3. Repeatedly get existing values from the cache Step 3 will sometimes return the wrong value (one that is associated with a different key to the one you asked for). This fix will simply raise an MemCacheError if you use a zero-length key.
monkeypatch classes. This makes it much easier and predictable to test.
Appears to be about 5% faster than normal connections.