-
Notifications
You must be signed in to change notification settings - Fork 46
Use in-memory cache for accounts and credentials FixesAB#3417272, Fixes AB#3417272 #2802
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
Use in-memory cache for accounts and credentials FixesAB#3417272, Fixes AB#3417272 #2802
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a feature flag to control whether the in-memory cache implementation is used for accounts and credentials in the token cache. The change adds a new flight configuration option that can be dynamically controlled without requiring code changes or redeployment.
- Adds a new
USE_IN_MEMORY_CACHE_FOR_ACCOUNTS_AND_CREDENTIALSfeature flag with a default value offalse - Modifies token cache creation logic to check both the existing
useInMemoryCacheparameter and the new flight configuration - Documents the change in the changelog
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| common4j/src/main/com/microsoft/identity/common/java/flighting/CommonFlight.java | Adds the new feature flag enum value for controlling in-memory cache usage |
| common4j/src/main/com/microsoft/identity/common/java/cache/MsalOAuth2TokenCache.java | Updates cache creation logic to check the new flight configuration in addition to the existing parameter |
| changelog.txt | Documents the change as a MINOR version update |
common4j/src/main/com/microsoft/identity/common/java/cache/MsalOAuth2TokenCache.java
Outdated
Show resolved
Hide resolved
common4j/src/main/com/microsoft/identity/common/java/cache/MsalOAuth2TokenCache.java
Outdated
Show resolved
Hide resolved
Glanced through code quickly, I doubt this method in broker flows. Broker directly uses constructor, so the change here won't have an effect. Refers to: common4j/src/main/com/microsoft/identity/common/java/cache/MsalOAuth2TokenCache.java:152 in 00da88b. [](commit_id = 00da88b, deletion_comment = False) |
common4j/src/main/com/microsoft/identity/common/java/cache/BrokerOAuth2TokenCache.java
Show resolved
Hide resolved
common4j/src/main/com/microsoft/identity/common/java/cache/BrokerOAuth2TokenCache.java
Show resolved
Hide resolved
common4j/src/main/com/microsoft/identity/common/java/cache/BrokerOAuth2TokenCache.java
Outdated
Show resolved
Hide resolved
mohitc1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
Fixes AB#3417272