Skip to content

Commit

Permalink
user login info caching
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaosEngine committed Jan 29, 2024
1 parent f448633 commit 7e35e38
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DotnetPlayground.Web/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static async Task Main(string[] args)
.AddJsonFile($"appsettings.{hostingContext.HostingEnvironment.EnvironmentName}.json", optional: true)
.AddEnvironmentVariables();
if (hostingContext.HostingEnvironment.IsDevelopment())
config.AddUserSecrets<Startup>(optional: true);
config.AddUserSecrets<Startup>(optional: true, reloadOnChange: true);
})
.ConfigureWebHost(webBuilder =>
{
Expand Down
3 changes: 3 additions & 0 deletions DotnetPlayground.Web/Views/Shared/_LoginPartial.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@using DotnetPlayground.Helpers
@using Microsoft.AspNetCore.Identity

<cache vary-by-user="true">

@inject UserManager<ApplicationUser> UserManager

<ul class="navbar-nav ms-auto">
Expand All @@ -28,3 +30,4 @@
}
</li>
</ul>
</cache>

0 comments on commit 7e35e38

Please sign in to comment.