Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request- Breaking change] Use an actual MemoryCache with eviction when instructed #3237

Open
bgavrilMS opened this issue Feb 10, 2025 · 2 comments

Comments

@bgavrilMS
Copy link
Member

bgavrilMS commented Feb 10, 2025

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:

builder.WithCacheOptions(CacheOptions.EnableSharedCacheOptions);
when the user configures a MemoryCache, Id.Web forces use the static cache.

Instead, we should actually use cache adapter (i.e. delete the condition here

if (!(_tokenCacheProvider is MsalMemoryTokenCacheProvider))
)

@jennyf19 jennyf19 changed the title [Feature Request] Use an actual MemoryCache with eviction when instructed [Feature Request- Breaking change] Use an actual MemoryCache with eviction when instructed Feb 10, 2025
@jennyf19
Copy link
Collaborator

Please provide a spec or design. Thanks @bgavrilMS

@bgavrilMS
Copy link
Member Author

Done, updated the original issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants