Fixes for Redis and Memcached, tests