This final entry about configuration of the solution is part of a series of blog posts about a custom approach to clearing output caches for managed sites with the Sitecore ASP.NET web Content Management System (CMS) and Experience Platform (XP). For more information, see the Resources section at the end of this blog post.
It might make sense to break the web.config into three configuration files (functionality specific to the publishing instance, such as the publishItem pipeline processor), functionality specific to remote instances (such as the custom remote event), and functionality common to both (such as the pipelines). Unfortunately, this results in three configuration files with some invalid combinations. Therefore I’ve left everything in the single Z.Sitecore.Sharedsource.TrackPublishing.config file. To ensure proper processing order, the name of the web.config include file(s) should follow most or all of the file names in the /App_Config/Include Subdirectory.
This Sitecore.Sharedsource.TrackPublishing.config configuration file:
indexing:end:remote event and specifies the OutputCacheClearingEventHandler handler for that event, where cache keys must contain _#index.
indexing:end event and adds the OutputCacheClearingEventHandler handler, where cache keys must contain _#index.