rearrange resetCaches, because it's important for isolation