It looks like setting flush on next connect executes a flush_all on the Memcache server on every reconnect. https://github.com/linsomniac/python-memcached/blob/master/memcache.py#L1413
This seems like a bug? Was the meaning of self.flush() misunderstood? I think we just want to flush the state from the connection and not expire all keys from the Memcache node.