Lazily create content and models in NuCache

This commit is contained in:
Stephan
2019-09-13 09:55:53 +02:00
parent 6839397206
commit e5634d13f1
2 changed files with 42 additions and 29 deletions

View File

@@ -233,8 +233,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
// invariant content items)
// if there is no 'published' published content, no culture can be published
var hasPublished = _contentNode.PublishedContent != null;
if (!hasPublished)
if (!_contentNode.HasPublished)
return false;
// if there is a 'published' published content, and does not vary = published
@@ -247,7 +246,7 @@ namespace Umbraco.Web.PublishedCache.NuCache
// there is a 'published' published content, and varies
// = depends on the culture
return _contentNode.PublishedContent.ContentData.CultureInfos.ContainsKey(culture);
return _contentNode.HasPublishedCulture(culture);
}
#endregion