diff --git a/src/Umbraco.PublishedCache.HybridCache/DocumentCache.cs b/src/Umbraco.PublishedCache.HybridCache/DocumentCache.cs index bebb34e67c..2d3e682f94 100644 --- a/src/Umbraco.PublishedCache.HybridCache/DocumentCache.cs +++ b/src/Umbraco.PublishedCache.HybridCache/DocumentCache.cs @@ -42,6 +42,9 @@ public sealed class DocumentCache : IPublishedContentCache public IPublishedContent? GetById(Guid contentId) => GetByIdAsync(contentId).GetAwaiter().GetResult(); + [Obsolete("This method is no longer used in Umbraco and is not defined on the interface. " + + "Any usage can be replaced with a call to IDocumentNavigationQueryService.TryGetRootKeys to retrieve the document keys, " + + "with each key passed to IPublishedContentCache.GetById to retrieve the IPublishedContent instances. Scheduled for removal in Umbraco 19.")] public IEnumerable GetAtRoot(bool preview, string? culture = null) { if (_documentNavigationQueryService.TryGetRootKeys(out IEnumerable rootKeys) is false) diff --git a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PropertyEditors/DateTimePropertyEditorTests.cs b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PropertyEditors/DateTimePropertyEditorTests.cs index 7a1a5d0dac..2e5135f1ab 100644 --- a/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PropertyEditors/DateTimePropertyEditorTests.cs +++ b/tests/Umbraco.Tests.Integration/Umbraco.Infrastructure/PropertyEditors/DateTimePropertyEditorTests.cs @@ -8,7 +8,6 @@ using Umbraco.Cms.Core.PropertyEditors; using Umbraco.Cms.Core.PublishedCache; using Umbraco.Cms.Core.Services; using Umbraco.Cms.Core.Sync; -using Umbraco.Cms.Infrastructure.HybridCache; using Umbraco.Cms.Tests.Common.Builders; using Umbraco.Cms.Tests.Common.Builders.Extensions; using Umbraco.Cms.Tests.Common.Testing; @@ -127,7 +126,6 @@ public class DateTimePropertyEditorTests : UmbracoIntegrationTest Assert.IsTrue(publishResult.Success); - var test = ((DocumentCache)PublishedContentCache).GetAtRoot(false); var publishedContent = await PublishedContentCache.GetByIdAsync(createContentResult.Result.Content.Key, false); Assert.IsNotNull(publishedContent);