U4-9282 Rollback not working

This commit is contained in:
Shannon
2016-12-19 16:58:24 +11:00
parent 5c40a1f9e9
commit 347ed2896a

View File

@@ -851,7 +851,8 @@ order by umbracoNode.level, umbracoNode.parentID, umbracoNode.sortOrder";
if (withCache)
{
var cached = RuntimeCache.GetCacheItem<IContent>(GetCacheIdKey<IContent>(dto.NodeId));
if (cached != null && cached.Published)
//only use this cached version if the dto returned is also the publish version, they must match
if (cached != null && cached.Published && dto.Published)
{
content[i] = cached;
continue;