From e558d11fa9758041b2ad9ffbe28722c57c21bd57 Mon Sep 17 00:00:00 2001 From: Paul Johnson Date: Tue, 24 Aug 2021 14:42:08 +0100 Subject: [PATCH] Revert "Optimization by returning the same instance" This reverts commit 990fc118cbd6df423be2107a75970a834ade1f76. When using the _reusableEditor field to create a BlockEditorPropertyEditor it doesn't matter that content type cache has been invalidated (memory cache) as the content types are also cached in a private field in the BlockEditorValues class. Closes #10910 (cherry picked from commit 94b0b252ece607c9ea6fff4e417635623ee1803e) --- src/Umbraco.Core/PropertyEditors/DataEditor.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Umbraco.Core/PropertyEditors/DataEditor.cs b/src/Umbraco.Core/PropertyEditors/DataEditor.cs index d927d10052..add523ecf6 100644 --- a/src/Umbraco.Core/PropertyEditors/DataEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataEditor.cs @@ -19,7 +19,6 @@ namespace Umbraco.Core.PropertyEditors public class DataEditor : IDataEditor { private IDictionary _defaultConfiguration; - private IDataValueEditor _reusableEditor; /// /// Initializes a new instance of the class. @@ -91,8 +90,7 @@ namespace Umbraco.Core.PropertyEditors /// simple enough for now. /// // TODO: point of that one? shouldn't we always configure? - public IDataValueEditor GetValueEditor() => ExplicitValueEditor ?? (_reusableEditor ?? (_reusableEditor = CreateValueEditor())); - + public IDataValueEditor GetValueEditor() => ExplicitValueEditor ?? CreateValueEditor(); /// ///