public override MvcHtmlString PropertyFor <TModel, TValue>(HtmlHelper <TModel> html, string viewModelPropertyName, object additionalViewData, object editorSettings, Expression <Func <TModel, TValue> > expression, Func <string, MvcHtmlString> displayForAction)
        {
            var metaDataModel = ModelMetadata.FromLambdaExpression(expression, html.ViewData);

            html.ViewContext.TrackContentItems(GetContentFromViewModel(metaDataModel));
            return(_defaultRenderer.PropertyFor <TModel, TValue>(html, viewModelPropertyName, additionalViewData, editorSettings, expression, displayForAction));
        }
        public override MvcHtmlString PropertyFor <TModel, TValue>(HtmlHelper <TModel> html, string viewModelPropertyName, object additionalViewData, object editorSettings, Expression <Func <TModel, TValue> > expression, Func <string, MvcHtmlString> displayForAction)
        {
            Func <MvcHtmlString> defaultRendering = () => _defaultRenderer.PropertyFor(html, viewModelPropertyName, additionalViewData, editorSettings, expression, displayForAction);

            //We do not want cache in edit mode
            if (_contextModeResolver.CurrentMode.EditOrPreview())
            {
                return(defaultRendering());
            }

            var additionalValuesDictionary = new RouteValueDictionary(additionalViewData);
            var contentDependecies         = GetContentDependecies <TModel>(html, additionalValuesDictionary);

            //We need to have a cachekey that is unique for the context of this property rendering. We use propertyname, content items, and template to build up the key
            return(contentDependecies.Any() ? new MvcHtmlString(_htmlCache.GetOrAdd(CreateCacheKey(contentDependecies, viewModelPropertyName, ResolveTemplateName(expression, html, additionalValuesDictionary)), c =>
            {
                c.AddDependencies(contentDependecies);
                return defaultRendering().ToString();
            })) :
                   defaultRendering());
        }