Refactor IPublishedContent.ItemType

This commit is contained in:
Stephan
2019-04-16 21:15:13 +02:00
parent 11ef00c63d
commit afda7a5661
16 changed files with 6 additions and 36 deletions

View File

@@ -280,9 +280,6 @@ namespace Umbraco.Web.PublishedCache.NuCache
}
}
/// <inheritdoc />
public override PublishedItemType ItemType => _contentNode.ContentType.ItemType;
/// <inheritdoc />
public override bool IsDraft(string culture = null)
{
@@ -421,7 +418,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
var publishedSnapshot = (PublishedSnapshot)_publishedSnapshotAccessor.PublishedSnapshot;
var cache = publishedSnapshot == null
? null
: ((IsPreviewing == false || PublishedSnapshotService.FullCacheWhenPreviewing) && (ItemType != PublishedItemType.Member)
: ((IsPreviewing == false || PublishedSnapshotService.FullCacheWhenPreviewing) && (ContentType.ItemType != PublishedItemType.Member)
? publishedSnapshot.ElementsCache
: publishedSnapshot.SnapshotCache);
return cache;