1
votes

We have two instance settings for CMS and CDN (Production).

After upgrading to Sitecore 8.0, Caching doesn't clear in CDN server when contents publish from CMS. So, when content publishes, then contents are blank on Live site and we have to clear Cache on http://cdnserver.com/sitecore/admin/cache.aspx.

It seems like Sitecore doesn't clear cache when publishing event fires.

Any solution??

======== Update ========

We are using only "website" as default.

3

3 Answers

1
votes

To clear cache you need to have next events on your config files

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

You can also check Scaling Guide document https://sdn.sitecore.net/upload/sitecore7/70/scaling_guide_sc70_a4.pdf . Document is for Siteccore 7 but is still good for Sitecore 8 and Sitecore 8.1 And yeh that's true Sitecore doesn't recycle application pool because it takes more than 30 seconds after restarts of the application pool to start again.

1
votes

I have seen this before on a upgrade to Sitecore 7.5 probably the same can happen on 8.

In my case the issue was the index files are corrupted or an access issue. Also there was nothing in the log about that. And reindex don't solve the issue. after an IIS reset I can do a success publish with cache clear and after about 5 minutes a new publish does not clear the cache because the process was silent crash.

Remove all files from the \Data\indexes directory. and check the access right. and try again.

Check also the log file on errors. If it does not help look at the EventQueue and PublishQueue SQL table in the web database. See Publish Queue, History and Event Queue too big

0
votes

First - Sitecore does not recycle the application pool when publishing. It remotely clears the cache on those servers.

As Sitecore Climber hinted at, you need to make sure that your Site names (these are the sites that you setup in your site definitions config) are listed in the publish:end and publish:end:remote events.

Also you need to make sure that your publish instance and instance names are set. The defaults take the machine names, but I have seen this fail many times. It is safer to configure those manually. They are set in the ScalabilitySettings.config, located in your /App_Config/Include folder. It will probably have a .disabled suffix to the file, just remove that part to enable it.

Also check that you have followed the Scaling Guide and enabled everything for remote publishing.