Skip to content

Conversation

@siddhijain
Copy link
Contributor

Fixes AB#3417272

@siddhijain siddhijain requested a review from a team as a code owner November 4, 2025 03:26
Copilot AI review requested due to automatic review settings November 4, 2025 03:26
@siddhijain siddhijain requested a review from a team as a code owner November 4, 2025 03:26
@github-actions github-actions bot changed the title Use in-memory cache for accounts and credentials FixesAB#3417272 Use in-memory cache for accounts and credentials FixesAB#3417272, Fixes AB#3417272 Nov 4, 2025
Copy link
Contributor

Copilot AI left a 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_CREDENTIALS feature flag with a default value of false
  • Modifies token cache creation logic to check both the existing useInMemoryCache parameter 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

@mohitc1
Copy link
Contributor

mohitc1 commented Nov 4, 2025

        MicrosoftRefreshToken> create(@NonNull final IPlatformComponents components, boolean useInMemoryCache) {

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)

Copy link
Contributor

@mohitc1 mohitc1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@siddhijain siddhijain merged commit f904c60 into dev Nov 13, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants