Bumped by Community user
    Bumped by Community user
    Bumped by Community user
    Bumped by Community user
3 updated to reflect new information that it's the `web[data]` cache
source | link

What can cause Sitecore item/data/prefetchweb[data] cache to not be evicted on publish

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 all cachesthe web[data] cache and also the web[items] cache (data/item/prefetch)which sits on the CD viatop of /sitecore/admin/cache.aspxweb[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.
  • Just to rule it out, we don't use HTMLCache but it is cleared anyway as normal on publish:end:remote - we know this isn't the issue.

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

Sitecore is supposed to evict items from the cachecaches 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".

What can cause Sitecore item/data/prefetch cache to not be evicted on publish

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 all caches (data/item/prefetch) on the CD via /sitecore/admin/cache.aspx the problem is immediately resolved.
  • If we manually republish (via the publish ribbon in Content Editor) the item, the problem is resolved.
  • Just to rule it out, we don't use HTMLCache but it is cleared anyway as normal on publish:end:remote - we know this isn't the issue.

With all this in mind, why and/or how could this happen? It's like one or more of the CD caches is "stuck" thinking the child items don't exist and therefore returns null each time from the cache. Clear the cache and it hits the database to get the real data, populates the cache and we're back in business.

Sitecore is supposed to evict items from the cache 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 "not found".

What can cause Sitecore web[data] cache to not be evicted on publish

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".

2 typo
source | link

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 all caches (data/item/prefetch) on the CD via /sitecore/admin/cache.aspx the problem is immediately resolved.
  • If we manually republish (via the publish ribbon in Content Editor) the item, the problem is resolved.
  • Just to rule it out, we don't use HTMLCache but it is cleared anyway as normal on publish:end:remote - we know this isn't the issue.

With all this isin mind, why and/or how could this happen? It's like the one or more of the CD caches is "stuck" thinking the child items don't exist and therefore returns null each time from the cache. Clear the cache and it hits the database to get the real data, populates the cache and we're back in business.

Sitecore is supposed to evict items from the cache 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 "not found".

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 all caches (data/item/prefetch) on the CD via /sitecore/admin/cache.aspx the problem is immediately resolved.
  • If we manually republish (via the publish ribbon in Content Editor) the item, the problem is resolved.
  • Just to rule it out, we don't use HTMLCache but it is cleared anyway as normal on publish:end:remote - we know this isn't the issue.

With all this is mind, why and/or how could this happen? It's like the one or more of the CD caches is "stuck" thinking the child items don't exist and therefore returns null each time from the cache. Clear the cache and it hits the database to get the real data, populates the cache and we're back in business.

Sitecore is supposed to evict items from the cache 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 "not found".

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 all caches (data/item/prefetch) on the CD via /sitecore/admin/cache.aspx the problem is immediately resolved.
  • If we manually republish (via the publish ribbon in Content Editor) the item, the problem is resolved.
  • Just to rule it out, we don't use HTMLCache but it is cleared anyway as normal on publish:end:remote - we know this isn't the issue.

With all this in mind, why and/or how could this happen? It's like one or more of the CD caches is "stuck" thinking the child items don't exist and therefore returns null each time from the cache. Clear the cache and it hits the database to get the real data, populates the cache and we're back in business.

Sitecore is supposed to evict items from the cache 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 "not found".

1
source | link

What can cause Sitecore item/data/prefetch cache to not be evicted on publish

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 all caches (data/item/prefetch) on the CD via /sitecore/admin/cache.aspx the problem is immediately resolved.
  • If we manually republish (via the publish ribbon in Content Editor) the item, the problem is resolved.
  • Just to rule it out, we don't use HTMLCache but it is cleared anyway as normal on publish:end:remote - we know this isn't the issue.

With all this is mind, why and/or how could this happen? It's like the one or more of the CD caches is "stuck" thinking the child items don't exist and therefore returns null each time from the cache. Clear the cache and it hits the database to get the real data, populates the cache and we're back in business.

Sitecore is supposed to evict items from the cache 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 "not found".