1

I have a strange problem with my distributed CM/CD Sitecore 8.2 environment.

Certain items and their children are published programmatically on a schedule after an automated update process. The update process deletes old children and creates new children with new IDs. This means the publish operation needs to delete the old children and create the new children on the CD at publish time.

The way these are published is using the following API call:

PublishManager.PublishItem
(
    item: parentItem,
    targets: dbTargetArray,
    languages: langArray,
    deep: true,
    compareRevisions: true, // smart publish (false for republish) 
    publishRelatedItems: false
 );
  • The items and their children get correctly published.
  • When pulling out the child items on the CD, some come through as null/non existent, even though we know they are there.
    • E.g. parentItem.Axes.SelectItems("./somechild/*[@@templatekey='sometemplate']"
  • If we clear the web[data] cache and also the web[items] cache (which sits on top of web[data]) on the CD the problem is immediately resolved.
  • If we manually republish (via the publish ribbon in Content Editor) the item, the problem is resolved.

With all this in mind, why and/or how could this happen? It's like the web[data] cache is "stuck" thinking the child items don't exist and therefore returns null each time, which then has the knock-on effect of putting null into the web[items] cache. Clear these 2 caches and it hits the database to get the real data, repopulates the caches and we're back in business.

Sitecore is supposed to evict items from the caches as and when they get updated, added, deleted, etc. by the publish process, but it's like it's somehow not evicting cache entries for the children that are "not found".

13
  • Does this issue happens everytime the custom publish is triggered? Commented Feb 7, 2018 at 14:52
  • @HishaamNamooya Yes pretty much. We publish approx 600 parent items, and of those probably about 30-40% have the caching issue, but different 30-40% each time. I presume it is related to certain pages getting hit on the CD during the publish operation, so it's never the same items each time, but never none.
    – theyetiman
    Commented Feb 7, 2018 at 16:45
  • i would say you need to check your configuration , check the following article as it is a good way to start with: himynameistim.wordpress.com/2017/03/02/… Commented Feb 7, 2018 at 19:04
  • 1
    Have you checked the size of your eventqueue. The item cache clear is done through the eventqueue to the CD servers. is the evenqueue read properly? Commented Feb 7, 2018 at 22:22
  • Which version of 8.2 are you on? There were several updates which had publishing issues specifically related to deleted items, from what I remember. Commented Feb 8, 2018 at 4:05

1 Answer 1

1

Older versions of 8.2 had some publishing issues:

There were a batch of publishing issues resolved in 8.2 updates 4 & 5:

I would recommend an upgrade to a more recent update of 8.2 or to contact support to see if there hotfixes you could apply.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.