Fix test cases that did not work if memcached was not available.