Skip to content

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

@bgavrilMS

Description

@bgavrilMS

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))
)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions