Correct location of cache clearing