Class ValueEditorCache
Implements IValueEditorCache to cache IDataValueEditor instances.
Inheritance
object
Namespace: Umbraco.Cms.Core.Cache
Assembly: Umbraco.Core.dll
Syntax
public class ValueEditorCache : IValueEditorCache
Remarks
This cache stores value editors keyed by data editor alias and data type ID to avoid repeatedly creating value editor instances during request processing.
Constructors
View SourceValueEditorCache()
Initializes a new instance of the ValueEditorCache class.
Declaration
public ValueEditorCache()
Methods
View SourceClearCache(IEnumerable<int>)
Clears the cached value editors for the specified data type identifiers.
Declaration
public void ClearCache(IEnumerable<int> dataTypeIds)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable<int> | dataTypeIds | The data type identifiers to clear from the cache. |
GetValueEditor(IDataEditor, IDataType)
Gets the value editor for the specified data editor and data type combination.
Declaration
public IDataValueEditor GetValueEditor(IDataEditor editor, IDataType dataType)
Parameters
| Type | Name | Description |
|---|---|---|
| IDataEditor | editor | |
| IDataType | dataType | The data type. |
Returns
| Type | Description |
|---|---|
| IDataValueEditor | The cached or newly created IDataValueEditor. |