Sitecore publishing html cache clear error after upgrade from 8.2 to 9.3

Few days back i was working on upgrading some of the features developed on Sitecore 8.2 to Sitecore 9.3, as a prerequisites i setup Sitecore 9.3 blank instance and the site was up and running, so far so good.
As a next step i deployed the upgraded feature to 9.3 website and tried to load the Sitecore after login- and boom… got error=An+error+occured error… of-course there is no clue from the error where and what went wrong.

error-occured

Also- there were several errors related to Sitecore.Publishing.HtmlcacheClearer in the logs.

Exception: System.Exception
Message: Could not resolve type name: Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel (method: Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)).
Source: Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)

After spending some time figuring out the root cause of the issue, came to know that sitecore 9.3 has inbuilt event handler to clear the cache on publish.

Check the below sitecore page for more details:
https://doc.sitecore.com/developers/93/sitecore-experience-manager/en/configure-html-caching.html

I checked the feature and saw that there was a patch present in the config which was added to clear the cache.

html-cache-clear-patch

I removed the custom patch to clear the cache and page started working fine.

So, if you are working on any upgrade project (for sitecore 9.3),  scan the solution and check if it has any custom patch to clear the cache, if exists remove the patch as it’s not needed anymore and handled by Sitecore in standard installation.

Hope it helps!

Happy learning 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s