VID-1960 Task to purge cache for pages with gallery tag

I'd prefer `while () {}` rather than `do {} while ()` especially when the conditional is always true.  The natural language aspect of "blah while (thing)" is lost when there is more than one line of "blah"