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.

Allowing sublayouts to control their own HTML cache keys

I spoke to a fellow MVP recently, Kern Herskind Nightingale and the topic of my blog came up, along with the fact that I hadn’t (at the time) updated for a while. The reason was my previous post about overriding rendering types. Originally, I had intended to use an example that would allow developers to add an interface to their sublayout classes and specify custom logic around building their cache keys, but it didn’t work as I’d intended.