Maintaining the HTML cache clearer

The HTML cache clearer does exactly what its name implies: it clears the Sitecore HTML caches. More specifically, it clears Sitecore HTML caches upon observing a publish end event. More specifically still, it clears the HTML cache of all websites that are registered with the HTML cache clearer upon observing a publish end event. There are quite a few posts around about how performance of the HTML cache can be improved (*cough* John West *cough*), but one thing that people don’t seem to mention often is how annoying it is to maintain the configuration correctly. This post outlines the method that I prefer to use, and it works pretty well for me so hopefully someone else will find it useful too.