I have an odd issue that seems to be related to caching but I've never seen this before.
Sitecore.Context.Item.Fields["OfficeContacts"].Value
is returning a different value from Sitecore.Context.Database.GetItem(Sitecore.Context.Item.ID).Fields["OfficeContacts"].Value
We're frequently getting the wrong content on the site- after content editors publish changes, they do not show up in SOME user sessions but show up correctly in other sessions. It seems random. I've gotten the obsolete data in an incognito session, and the updated data in my regular Chrome session. Seems to have nothing to do with whether the user has visited the site before, as colleagues who have never been to the site saw the old content when testing. This is reproducable on lower environments.
When reproducing the issue on my local, my debugging revealed Sitecore.Context.Item.Fields["OfficeContacts"].Value
returned the obsolete value, which DOES NOT match what is visible in the web database raw values. However, Sitecore.Context.Database.GetItem(Sitecore.Context.Item.ID).Fields["OfficeContacts"].Value
, in the same session and same Watch window, DOES return the correct data.
What would cause Sitecore.Context.Item
to cache or return old data?
web
database, how many item versions are shown in the versions dropdown? If you see more than one, it can be caused by content testing.eventQueueProvider
? Is iteventQueueProvider defaultEventQueue="web"
? And what about<setting name="EnableEventQueues"
?