Fixing cache setting in tests