Revert "Optimization by returning the same instance"
This reverts commit990fc118cb. 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 commit94b0b252ec)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
14a94f0ba5
commit
e558d11fa9
@@ -19,7 +19,6 @@ namespace Umbraco.Core.PropertyEditors
|
||||
public class DataEditor : IDataEditor
|
||||
{
|
||||
private IDictionary<string, object> _defaultConfiguration;
|
||||
private IDataValueEditor _reusableEditor;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DataEditor"/> class.
|
||||
@@ -91,8 +90,7 @@ namespace Umbraco.Core.PropertyEditors
|
||||
/// simple enough for now.</para>
|
||||
/// </remarks>
|
||||
// TODO: point of that one? shouldn't we always configure?
|
||||
public IDataValueEditor GetValueEditor() => ExplicitValueEditor ?? (_reusableEditor ?? (_reusableEditor = CreateValueEditor()));
|
||||
|
||||
public IDataValueEditor GetValueEditor() => ExplicitValueEditor ?? CreateValueEditor();
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <remarks>
|
||||
|
||||
Reference in New Issue
Block a user