I'd look in to Donut caching, where you 'vary by custom string' such that the string represents the User's role or Id.
Alternatively, just create a decent view model for all the site pages that might be rendered and cache that model. The don't worry about the view running each time as it should be relatively fast. I don't think Umbraco.MemberHasAccess will hit the database.
role-based navigation - slows down rendering
Hi,
whats the best way to render a role based navigation?
There is a function Umbraco.MemberHasAccess(string path) that should handle this.
eg:
But this function slows down the rendering as it does lots of duplicate roundtrips.
Thx in advance,
Andreas
Umbraco 7.5.10
I'd look in to Donut caching, where you 'vary by custom string' such that the string represents the User's role or Id.
Alternatively, just create a decent view model for all the site pages that might be rendered and cache that model. The don't worry about the view running each time as it should be relatively fast. I don't think Umbraco.MemberHasAccess will hit the database.
is working on a reply...