U4-5113 - Preview with Cached Partials is showing stale content

Created by Dan Booth 20 Jun 2014, 09:19:22 Updated by Shannon Deminick 26 Jun 2017, 05:39:42

This seems to be a similar issue to U4-495 'Umbraco 4.7.1 - Preview with cached macros' except that it affects cached partial views (I'm seeing this in Umbraco 6.x but suspect it affects more versions). This means that if you preview a page that uses Html.CachedPartial("...") then the partial gets cached the first time it is previewed. After that, any changes you make to the page are not shown (even if you re-save) and you just get the content that has been previously cached in the partial.

I've worked around this by using this logic: @if (UmbracoContext.InPreviewMode) { @Html.Partial("NewsItem") } else { @Html.CachedPartial("NewsItem", null, 3600, true) }

However, it would be much better if preview didn't cache partials or that saving clears the partial cache.


Shannon Deminick 26 Jun 2017, 05:39:42

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/

Priority: Normal

Type: Bug

State: Closed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 6.1.6, 6.2.1

Due in version:


Story Points: