Skip to content

Instantly share code, notes, and snippets.

@blacktambourine
Created April 6, 2018 08:10
Show Gist options
  • Save blacktambourine/88a63a2e8bbe77a3b07cb2b6867821ef to your computer and use it in GitHub Desktop.
Save blacktambourine/88a63a2e8bbe77a3b07cb2b6867821ef to your computer and use it in GitHub Desktop.
Sitecore Clear Cache for all sites on publish
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<!--Clear the html cache on publish; default only clear for site called "website"-->
<events>
<event name="publish:end">
<handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
<sites hint="list">
<site>MyWebsite1</site>
<site>MyWebsite2</site>
</sites>
</handler>
</event>
<event name="publish:end:remote">
<handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
<sites hint="list">
<site>MyWebsite1</site>
<site>MyWebsite2</site>
</sites>
</handler>
</event>
</events>
</sitecore>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment