-
Notifications
You must be signed in to change notification settings - Fork 241
Open
Description
Today, Id.Web configures MSAL to use SharedMemoryCache - a static cache. This is fast, but no eviction.
With the introduction of new concepts like FMI, which increase the number of tokens, a cache without eviction becomes problematic.
Design
Id.Web configured the static cache here:
microsoft-identity-web/src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs
Line 796 in 2b8fbf0
| builder.WithCacheOptions(CacheOptions.EnableSharedCacheOptions); |
Instead, we should actually use cache adapter (i.e. delete the condition here
microsoft-identity-web/src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs
Line 849 in 2b8fbf0
| if (!(_tokenCacheProvider is MsalMemoryTokenCacheProvider)) |