Skip to content

Commit 0ccca80

Browse files
committed
Small update
1 parent 5986461 commit 0ccca80

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

articles/active-directory/develop/msal-net-token-cache-serialization.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,19 @@ The [Microsoft.Identity.Web](https://github.com/AzureAD/microsoft-identity-web)
281281
| `AddSessionTokenCaches` | `TokenCacheProviders.Session` | The token cache is bound to the user session. This option isn't ideal if the ID token is too large because it contains too many claims as the cookie would be too large.
282282
| `AddDistributedTokenCaches` | `TokenCacheProviders.Distributed` | The token cache is an adapter against the ASP.NET Core `IDistributedCache` implementation, therefore enabling you to choose between a distributed memory cache, a Redis cache, a distributed NCache, or a SQL Server cache. For details about the `IDistributedCache` implementations, see https://docs.microsoft.com/aspnet/core/performance/caching/distributed#distributed-memory-cache.
283283

284+
Simple case using the in-memory cache:
285+
286+
```C#
287+
// or use a distributed Token Cache by adding
288+
services.AddSignIn(Configuration);
289+
services.AddWebAppCallsProtectedWebApi(Configuration, new string[] { scopesToRequest })
290+
.AddInMemoryTokenCaches();
291+
```
292+
293+
284294
Examples of possible distributed caches:
285295

286-
```CSharp
296+
```C#
287297
// or use a distributed Token Cache by adding
288298
services.AddSignIn(Configuration);
289299
services.AddWebAppCallsProtectedWebApi(Configuration, new string[] { scopesToRequest })

0 commit comments

Comments
 (0)