pull the invalidate cache parameter into its own loop too