Skip to content

Commit 0ae12c9

Browse files
committed
Strong language on adopting a production provider
1 parent c3dbc9f commit 0ae12c9

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

aspnetcore/blazor/call-web-api.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ Production web apps and web APIs should use a production distributed token cache
8787
>
8888
> [!INCLUDE[](~/includes/package-reference.md)]
8989
90-
To configure a production distributed cache provider, see <xref:performance/caching/distributed>.
90+
To configure a production distributed cache provider, see <xref:performance/caching/distributed>.
91+
92+
> [!WARNING]
93+
> Always replace the in-memory distributed token caches with a real token cache provider when deploying the app to a production environment. If you fail to adopt a production distributed token cache provider, the app may suffer significantly degraded performance.
9194
9295
For more information, see [Token cache serialization: Distributed caches](/entra/msal/dotnet/how-to/token-cache-serialization?tabs=msal#distributed-caches). However, the code examples shown don't apply to ASP.NET Core apps, which configure distributed caches via <xref:Microsoft.Extensions.DependencyInjection.MemoryCacheServiceCollectionExtensions.AddDistributedMemoryCache%2A>, not <xref:Microsoft.Identity.Web.TokenCacheExtensions.AddDistributedTokenCache%2A>.
9396

aspnetcore/blazor/security/blazor-web-app-with-entra.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,8 @@ builder.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
416416

417417
:::zone-end
418418

419-
> [!NOTE]
420-
> The preceding examples use in-memory distributed token caches, but production apps should use a production distributed token cache provider. For more information, see the [Use a production distributed token cache provider](#use-a-production-distributed-token-cache-provider) section.
419+
> [!WARNING]
420+
> The preceding examples use in-memory distributed token caches, but production apps should use a production distributed token cache provider. Otherwise, the app may have poor performance in some scenarios. For more information, see the [Use a production distributed token cache provider](#use-a-production-distributed-token-cache-provider) section.
421421
422422
The callback path (`CallbackPath`) must match the redirect URI (login callback path) configured when registering the application in the Entra or Azure portal. Paths are configured in the **Authentication** blade of the app's registration. The default value of `CallbackPath` is `/signin-oidc` for a registered redirect URI of `https://localhost/signin-oidc` (a port isn't required).
423423

@@ -647,7 +647,7 @@ builder.Services.AddAuthentication(OpenIdConnectDefaults.AuthenticationScheme)
647647
```
648648

649649
> [!NOTE]
650-
> The preceding example uses in-memory distributed token caches, but production apps should use a production distributed token cache provider. For more information, see the [Use a production distributed token cache provider](#use-a-production-distributed-token-cache-provider) section.
650+
> The preceding example uses in-memory distributed token caches, but production apps should use a production distributed token cache provider. Otherwise, the app may have poor performance in some scenarios. For more information, see the [Use a production distributed token cache provider](#use-a-production-distributed-token-cache-provider) section.
651651
652652
In the `MinimalApiJwt` project, add the following app settings configuration to the `appsettings.json` file:
653653

@@ -708,7 +708,10 @@ builder.Services.AddDistributedMemoryCache();
708708
>
709709
> [!INCLUDE[](~/includes/package-reference.md)]
710710
711-
To configure a production distributed cache provider, see <xref:performance/caching/distributed>.
711+
To configure a production distributed cache provider, see <xref:performance/caching/distributed>.
712+
713+
> [!WARNING]
714+
> Always replace the in-memory distributed token caches with a real token cache provider when deploying the app to a production environment. If you fail to adopt a production distributed token cache provider, the app may suffer significantly degraded performance.
712715
713716
For more information, see [Token cache serialization: Distributed caches](/entra/msal/dotnet/how-to/token-cache-serialization?tabs=msal#distributed-caches). However, the code examples shown don't apply to ASP.NET Core apps, which configure distributed caches via <xref:Microsoft.Extensions.DependencyInjection.MemoryCacheServiceCollectionExtensions.AddDistributedMemoryCache%2A>, not <xref:Microsoft.Identity.Web.TokenCacheExtensions.AddDistributedTokenCache%2A>.
714717

0 commit comments

Comments
 (0)