This entry about the custom:publish:end:remote event used to pass custom parameters to a remote event 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.
To address distributed publishing, this solution seems to require that we pass custom parameters to a remote event. Luckily, Benjamin Vangansewinkel has already done the hard work for us.
First, the CustomPublishEndRemoteEvent class that represents the remote event. This class must have the [DataContract] attribute and in our case inherits from the default PublishEndRemoteEvent. This class has the following properties:
I was thinking that the keys that go into the cache to indicate when this process last cleared those caches could include identifiers such custom:publish:end:remote or indexing:end, to separate intervals for different types of events or otherwise.
This solution includes the CustomPublishEndRemoteEventArgs class that inherits from the default PublishEndRemoteEventArgs, which implements an interface and inherits from System.EventArgs. My project shows no usages of the CustomPublishEndRemoteEventArgs, but something apparently wires this type of argument to CustomPublishEndRemoteEvent. This class has a single OutputCacheClearingOptions property named after its type to access cache clearing options for the current operation.