Skip to content

Instantly share code, notes, and snippets.

@casper-rasmussen
Created March 20, 2016 22:26
Show Gist options
  • Save casper-rasmussen/9d83b1066ab248f3b460 to your computer and use it in GitHub Desktop.
Save casper-rasmussen/9d83b1066ab248f3b460 to your computer and use it in GitHub Desktop.
public void StartListen()
{
//Bind our local publish events
DataFactory.Instance.PublishedContent += (sender, args) => this.PurgeOutputCacheByContent(args.Content);
if (!this._eventRegistry.Enabled)
return;
//Finding the event for EPiServers RemoteCacheSynchronization-RemoveFromCache
Event changeEvent = this._eventRegistry.Get(EventId);
if (changeEvent == null)
return;
//When events are raised
changeEvent.Raised += ChangeEventOnRaised;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment