Ensure caches are cleared properly.