Reputation: 135
I'm using Sitecore 8.0 and I have a dynamically breadcrumb and the cache settings when rendering the view:
@Html.Sitecore().Rendering(RenderIds.Breadcrumbs, new {Cacheable = true, Cache_VaryByData = true, Cache_VaryByUrl = true, Cache_VaryByParameters = true, Cache_VaryByQueryString = true })
Also the cache settings are setup in Sitecore on the rendering. The issue is that when I access the same item coming from different paths the breadcrumb is not being updated and shows a cached path depending for what got there first. After a while it gets updated, but will fail when I go to the item through another path.
I have removed the caching settings from the view and it looks to work correctly. Any idea why this is happening or if I should not use caching on dynamically generated content?
Upvotes: 3
Views: 324
Reputation: 1817
It is likely due to known product bug in Sitecore 8.0/8.1 which incorrectly handles in-line cache settings.
See this blog post for more info - https://vladimirhil.com/2016/02/28/html-sitecore-renderingpathorid-does-not-apply-varyby-settings/
Upvotes: 0