Performance: Request cache referenced entities when saving documents with block editors (#20590)

* Added request cache to content and media lookups in mult URL picker.

* Allow property editors to cache referenced entities from block data.

* Update src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add obsoletions.

* Minor spellcheck

* Ensure request cache is available before relying on it.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: kjac <kja@umbraco.dk>
This commit is contained in:
Andy Butland
2025-10-31 10:49:26 +01:00
committed by GitHub
parent f27fb58e13
commit 66409b9ebd
7 changed files with 368 additions and 41 deletions

View File

@@ -2,6 +2,7 @@ using System.ComponentModel.DataAnnotations;
using Microsoft.Extensions.Logging;
using Moq;
using NUnit.Framework;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.Core.Models.Validation;
using Umbraco.Cms.Core.PropertyEditors;
@@ -68,7 +69,8 @@ internal class MultiUrlPickerValueEditorValidationTests
new SystemTextJsonSerializer(new DefaultJsonSerializerEncoderFactory()),
Mock.Of<IIOHelper>(),
Mock.Of<IContentService>(),
Mock.Of<IMediaService>())
Mock.Of<IMediaService>(),
AppCaches.Disabled)
{
ConfigurationObject = new MultiUrlPickerConfiguration(),
};