1
votes

Our team is having an issue when a publish from the content authoring server to the the content delivery web database will not refresh the content delivery server's cache.

We have a content authoring server which has a master, core, and web database. We also have a content delivery server which has it's own master, core, and web. We have two publishing options. One will publish to the content authoring web database. The other will publish to the content delivery server's web database.

My question(s):

1) How would the publish on the content authoring server know to clear the cache on the content delivery server?

In our site definition file we have defined two events named "publish:end" and "publish:end:remote". The method we've attached here is type="Sitecore.Publishing.HtmlCacheClearer, Sitecore.Kernel", method="ClearCache"

2) What is the difference between "publish:end" and "publish:end:remote"?

We have separate site definition files for each environment. There is one for the content authoring server and one for the content delivery server. Since the publish to the content delivery server's web database occurs on the content authoring server - one would assume that it is using the events declared in the content authoring server's site definition file.

3) Can we add the 'content delivery sites' into the content authoring site definition, and then add them into the "publish:end" and "publish:end:remote" event declarations?

4) Does one need to add them to one or both?

5) What exactly does the content authoring site do when it pulls the list of sites in the "publish:end" and "publish:end:remote" configurations?

3

3 Answers

1
votes

As mentioned by Ruud, the Sitecore Scaling guide will help you with a lot of your questions.

The first thing to look for is to see if you have EnableEventQueues set to true. That will make sure that your distributed nodes are looking for the events in the master database.

The second thing to look for is to make sure you have your instance names specified so that the content delivery node knows which events to look for. These settings are InstanceName and Publishing.PublishingInstance. Your authoring node will have the same value in both, but your delivery node should have the authoring nodes name in the PublishingInstance setting.

Lastly, and this might just be me, it seems from your question that you have two core and two master databases? I'm not sure why your delivery node need its own core and master databases, unless you are replicating. From my understanding, the EventQueue table in the Core database is what is used by the all the instances to communicate events to each other. Make sure that in some way your delivery and authoring are able to 'share' the EventQueue table, either by using the same Core DB, or by replicating your authoring Core out to your delivery instance.

Between those three things and the Sitecore Scaling guide, you should be able to get your delivery instance to listen to the publishing events from authoring.

1
votes

When searching for solutions to this issue none of the standard advice worked for me. Only when I followed the steps from this page did my cache start clearing correctly again: http://sitecoreskills.blogspot.co.uk/2015/08/sitecore-html-cache-doesnt-clear.html

The solution turned out to be completely unrelated to the HTML cache or the event queues.

Sitecore maintains a legacy Lucene index called __System. In our case that index was locked so it couldn't be updated. That somehow prevented the clearance of the HTML cache. The answer was to simply delete it!

It turns out that the __System index can be removed without any problems - Sitecore just recreates it afterwards.

0
votes

After hours of troubleshooting, we tried changing the InstanceName on the ScalabilitySettings.config file and the cache started to clear after a publish.

I believe you can change the InstanceName to any value and it started working.