U4-10845 MultiNodeTreePickerPropertyConverter - trashed content causes database lookups

If the first ID in the MNTP value is a trashed content node, then the `ConvertSourceToObject` method would
check if the ID is a media or member node, both of these incur a database call.

This can cause a detrimental performance impact on the website.

This patch uses the `startNode.type` prevalue to detect the node type, (e.g. Content, Media or Member).
The prevalue is cached in a private `ConcurrentDictionary` and refreshed using the `DataTypeCacheRefresher` event.
> _Following the same caching-pattern as the Slider, Tags and MediaPicker value-converters._

<http://issues.umbraco.org/issue/U4-10845>
This commit is contained in:
leekelleher
2018-01-18 10:49:18 +00:00
parent 319acc199e
commit 87f09b2ee6
2 changed files with 79 additions and 35 deletions

View File

@@ -117,6 +117,7 @@ namespace Umbraco.Web.Cache
LegacyMediaPickerPropertyConverter.ClearCaches();
SliderValueConverter.ClearCaches();
MediaPickerPropertyConverter.ClearCaches();
MultiNodeTreePickerPropertyConverter.ClearCaches();
base.Refresh(jsonPayload);