Tips and trix how to use events in EPiServer
PublishedPage event
The cache is cleared after this event happens so if you trigger some external functionality the cache for the updated page has to be cleared.
Example
void PublishedPage(object sender, PageEventArgs e)
{
DataFactoryCache.RemovePage(e.PageLink.CreateReferenceToPublishedPage());