Let’s Talk

We would love to hear from you. Want to know more about
our services or have any questions? Say Hi!

How to resolve “publishing HTML cache clearer” error while upgrading Sitecore?

March 23, 2023
How to resolve “publishing HTML cache clearer” error while upgrading Sitecore?
Mitesh Patel
Mitesh Patel
Technical Head
how-to-resolve-publishing-html-cache-clearer-error-while-upgrading-sitecore

Through this blog, we will try to understand what the publishing HTML cache clearer error is and how you can resolve it while upgrading Sitecore.

During the process of upgrading Sitecore 9.2 to 10.2, you will find this error given below. When using Sitecore 9.2, the HTML cache clearer was used for multiple regions and multiple languages. But, it was creating issues when it came to Sitecore 10.2 So, let us resolve it using the below given steps.

how-to-resolve-publishing-html-cache-clearer-error-while-upgrading-sitecore-1

Step 1 Go to your inetpub folder and go to the wwwroot folder.

Step 2 Go to your project folder and to the App_Congig folder.

Step 3 Go to the include folder and click on the project folder.

Step 4 Go to your website.config for an example: dev. website.config after removing the below code:

<events> 
    <event name="publish:end"> 
        <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache"> 
            <sites hint="list"> 
                <site hint="sitename">sitename</site> 
            </sites> 
        </handler> 
    </event> 
    <event name="publish:end:remote"> 
        <handler type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel" method="ClearCache"> 
            <sites hint="list"> 
                <site hint="sitename">sitename</site> 
            </sites> 
        </handler> 
    </event> 
</events> 
                    

Step 5) Add the line: preventHtmlCacheClear="true" in site config and save the config.

<site name="custom_website" cacheHtml="true" preventHtmlCacheClear="true" />

Step 6) Refresh the site.

The error will now be gone and the website will perfectly load after the given steps.


YOU MAY ALSO LIKE