Tuesday, November 19, 2019

Multisite cache clearing

https://community.sitecore.net/technical_blogs/b/sitecorejohn_blog/posts/clear-output-caches-for-all-managed-sites-after-publication-with-the-sitecore-asp-net-cms


IN a custom site def config. Sitecore cache is cleared for each site individually on each environment. If they are named the same. If sites are named differently each one needs a cache clear node.

 <events>
            <event name="publish:end">
                <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
                    <sites hint="list">
                        <site hint="horizon">horizon</site>
                    </sites>
                </handler>
            </event>
            <event name="publish:end:remote">
                <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache">
                    <sites hint="list">
                        <site hint="horizon">horizon</site>
                    </sites>
                </handler>
            </event>
        </events>
        <sites>
            <site name="horizon" environment:require="local" patch:after="site[@name='modules_website']"
                  hostName = "sc910.sc"
                  targetHostName="sc910.sc"
                  database="web"
                  virtualFolder="/"
                  physicalFolder="/"
                  rootPath="/sitecore/content/horizon"
                  startItem="/Home"
                  dictionaryPath="/sitecore/content/horizon/global/dictionary"
                  dictionaryAutoCreate="false"
                  placeholderSettingsRoot="/sitecore/layout/Placeholder Settings/Project/horizon"
                  domain="extranet"
                  allowDebug="true"
                  cacheHtml="true"
                  htmlCacheSize="50MB"
                  registryCacheSize="0"
                  viewStateCacheSize="0"
                  xslCacheSize="25MB"
                  filteredItemsCacheSize="10MB"
                  enablePreview="true"
                  enableWebEdit="true"
                  enableDebugger="true"
                  disableClientData="false"
                  cacheRenderingParameters="true"
                  renderingParametersCacheSize="10MB"
                  formsRoot="{4BC8A78C-44A7-46EB-8126-040D3F12CAA0}"
                  loginPage="/login"
                  scheme="http"
                  enableItemLanguageFallback="true" />
            <site name="horizon" environment:require="integration" patch:after="site[@name='modules_website']"
                  targetHostName="hd-rg53-www1-integration-280970-single.azurewebsites.net"
                  database="web"
                  virtualFolder="/"
                  physicalFolder="/"
                  rootPath="/sitecore/content/horizon"
                  startItem="/Home"
                  dictionaryPath="/sitecore/content/horizon/global/dictionary"
                  dictionaryAutoCreate="false"
                  placeholderSettingsRoot="/sitecore/layout/Placeholder Settings/Project/horizon"
                  domain="extranet"
                  allowDebug="true"
                  cacheHtml="true"
                  htmlCacheSize="50MB"
                  registryCacheSize="0"
                  viewStateCacheSize="0"
                  xslCacheSize="25MB"
                  filteredItemsCacheSize="10MB"
                  enablePreview="true"
                  enableWebEdit="true"
                  enableDebugger="true"
                  disableClientData="false"
                  cacheRenderingParameters="true"
                  renderingParametersCacheSize="10MB"
                  formsRoot="{4BC8A78C-44A7-46EB-8126-040D3F12CAA0}"
                  loginPage="/login"
                  scheme="https"
                  enableItemLanguageFallback="true" />

No comments:

Post a Comment