L2 cache bypass#3444
Merged
Merged
Conversation
robezirg
reviewed
Apr 14, 2026
robezirg
reviewed
Apr 14, 2026
robezirg
reviewed
Apr 14, 2026
robezirg
reviewed
Apr 14, 2026
robezirg
reviewed
Apr 14, 2026
robezirg
reviewed
Apr 16, 2026
pmaytak
reviewed
Apr 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a context-aware configuration event handler API so ConfigurationManager can signal when a retrieval was triggered by RequestRefresh, enabling handlers to bypass a cache lookup (per Bug 3542293).
Changes:
- Introduces
ConfigurationRetrievalContextandIConfigurationEventHandlerContextAware<T>to pass retrieval context (includingBypassCache) into event handlers. - Updates
ConfigurationManager(blocking + non-blocking paths) to pass context intoBeforeRetrieveAsync, preferring the context-aware overload when implemented. - Adds OpenIdConnect test coverage and a context-aware mock event handler validating
BypassCachebehavior across first retrieval, automatic refresh, andRequestRefresh.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/MockConfigurationEventHandlerContextAware.cs | Adds a context-aware test double implementing the new handler interface. |
| test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/ConfigurationManagerEventHandlerContextAwareTests.cs | Adds tests validating context-aware handler selection and BypassCache semantics. |
| src/Microsoft.IdentityModel.Protocols/PublicAPI.Unshipped.txt | Records newly introduced public surface area for API validation. |
| src/Microsoft.IdentityModel.Protocols/GlobalSuppressions.cs | Updates suppression target signature for the updated HandleBeforeRetrieveAsync method. |
| src/Microsoft.IdentityModel.Protocols/Configuration/IConfigurationEventHandlerContextAware.cs | Defines the new context-aware configuration event handler interface. |
| src/Microsoft.IdentityModel.Protocols/Configuration/ConfigurationRetrievalContext.cs | Defines the context object carrying the BypassCache signal. |
| src/Microsoft.IdentityModel.Protocols/Configuration/ConfigurationManager_Blocking.cs | Passes BypassCache to the handler in blocking mode based on refresh request state. |
| src/Microsoft.IdentityModel.Protocols/Configuration/ConfigurationManager.cs | Wires context into handler calls and attempts to propagate bypass behavior into background refresh flows. |
…figurationManagerEventHandlerContextAwareTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ionManager.cs Co-authored-by: Peter <34331512+pmaytak@users.noreply.github.com>
robezirg
reviewed
Apr 17, 2026
add after to context aware interface
robezirg
reviewed
Apr 17, 2026
This was referenced Jun 8, 2026
Closed
Open
Merged
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses Bug 3542293: RequestRefresh not bypassing L2 Cache
Introduce a new interface that provides context to the event handler implementation, allowing it to optionally bypass a cache lookup.
This will need to be merged and released before the corresponding MISE fix can be merged.