Skip to content

Commit

Permalink
Fixed missing TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
bergmania committed Aug 11, 2021
1 parent 53fc169 commit c2d54f5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Umbraco.Web.Website/Extensions/HtmlHelperRenderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Net;
using System.Text;
using System.Text.Encodings.Web;
using System.Threading.Tasks;
using System.Web;
using Microsoft.AspNetCore.Antiforgery;
using Microsoft.AspNetCore.DataProtection;
Expand All @@ -18,6 +19,7 @@
using Umbraco.Cms.Core.Hosting;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.Core.Logging;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Core.Web.Mvc;
using Umbraco.Cms.Web.Common.Controllers;
Expand Down Expand Up @@ -82,7 +84,7 @@ public static IHtmlContent PreviewBadge(this IHtmlHelper helper, IUmbracoContext

}

public static IHtmlContent CachedPartial(
public static async Task<IHtmlContent> CachedPartialAsync(
this IHtmlHelper htmlHelper,
string partialViewName,
object model,
Expand Down Expand Up @@ -113,11 +115,9 @@ public static IHtmlContent CachedPartial(

if (cacheByMember)
{
// TODO reintroduce when members are migrated
throw new NotImplementedException("Reintroduce when members are migrated");
// var helper = Current.MembershipHelper;
// var currentMember = helper.GetCurrentMember();
// cacheKey.AppendFormat("m{0}-", currentMember?.Id ?? 0);
var memberManager = htmlHelper.ViewContext.HttpContext.RequestServices.GetRequiredService<IMemberManager>();
var currentMember = await memberManager.GetCurrentMemberAsync();
cacheKey.AppendFormat("m{0}-", currentMember?.Id ?? "0");
}

if (contextualKeyBuilder != null)
Expand Down

0 comments on commit c2d54f5

Please sign in to comment.