Merge pull request #10156 from umbraco/netcore/feature/cache_macros_per_member_and_make_render_macro_async

Netcore: Fix cache macros per member and make render macro async
This commit is contained in:
Mole
2021-04-20 15:46:08 +02:00
committed by GitHub
17 changed files with 82 additions and 117 deletions

View File

@@ -60,11 +60,11 @@ namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters
//callback for when text block is found
textBlock => sb.Append(textBlock),
//callback for when macro syntax is found
(macroAlias, macroAttributes) => sb.Append(_macroRenderer.Render(
(macroAlias, macroAttributes) => sb.Append(_macroRenderer.RenderAsync(
macroAlias,
umbracoContext.PublishedRequest?.PublishedContent,
//needs to be explicitly casted to Dictionary<string, object>
macroAttributes.ConvertTo(x => (string)x, x => x)).Text));
macroAttributes.ConvertTo(x => (string)x, x => x)).GetAwaiter().GetResult().Text));
return sb.ToString();
}