diff --git a/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedContentCache.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedContentCache.cs index 51c6668913..e7b5a45a3a 100644 --- a/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedContentCache.cs +++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedContentCache.cs @@ -548,7 +548,9 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache public override IEnumerable GetByContentType(PublishedContentType contentType) { - throw new NotImplementedException(); + return GetAtRoot() + .SelectMany(x => x.DescendantsOrSelf()) + .Where(x => x.ContentType == contentType); } #endregion diff --git a/src/Umbraco.Web/PublishedCache/IPublishedCache.cs b/src/Umbraco.Web/PublishedCache/IPublishedCache.cs index 178d34cfa3..25d70b81b4 100644 --- a/src/Umbraco.Web/PublishedCache/IPublishedCache.cs +++ b/src/Umbraco.Web/PublishedCache/IPublishedCache.cs @@ -208,8 +208,7 @@ namespace Umbraco.Web.PublishedCache /// The content type, or null. /// The alias is case-insensitive. PublishedContentType GetContentType(string alias); - - // TODO: can we implement this, now? maybe only with NuCache else will throw NotImplemented... + IEnumerable GetByContentType(PublishedContentType contentType); } } diff --git a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs index 74cf960170..f08fa1e8e3 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/ContentCache.cs @@ -388,7 +388,9 @@ namespace Umbraco.Web.PublishedCache.NuCache public override IEnumerable GetByContentType(PublishedContentType contentType) { - throw new NotImplementedException(); + return GetAtRoot() + .SelectMany(x => x.DescendantsOrSelf()) + .Where(x => x.ContentType == contentType); } #endregion