Make disable.cache=true only work for test.