-
Notifications
You must be signed in to change notification settings - Fork 472
L2 cache bypass #3444
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
Merged
Merged
L2 cache bypass #3444
Changes from 5 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
93447ae
bypass cache option in result
westin-m 4e3df66
Revert "bypass cache option in result"
westin-m 2b7dc65
Merge branch 'dev' into westin/cache-bypass
westin-m 2c2f6fd
poc for context aware event handler
westin-m e6b06d6
Follow up on draft feedback
westin-m 93b46ab
PR feedback
westin-m f3ccfe1
pr feedback
westin-m 08e2de7
Update test/Microsoft.IdentityModel.Protocols.OpenIdConnect.Tests/Con…
westin-m b18076c
Update src/Microsoft.IdentityModel.Protocols/Configuration/Configurat…
westin-m e1eb16e
pr feedback
westin-m 02a5fb3
pr feedback
westin-m ec118f4
Coverage for after update with context
westin-m 004ff91
Merge branch 'dev' into westin/cache-bypass
westin-m 90d09d6
test updates
westin-m 6b78a2e
Merge branch 'westin/cache-bypass' of https://github.com/AzureAD/azur…
westin-m 4ca1950
fix race condition in tests
westin-m 1eb7d02
updates to fix test flakiness
westin-m File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
15 changes: 15 additions & 0 deletions
15
src/Microsoft.IdentityModel.Protocols/Configuration/ConfigurationRetrievalContext.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| namespace Microsoft.IdentityModel.Protocols.Configuration; | ||
|
|
||
| /// <summary> | ||
| /// Defines the context for configuration retrieval operations. | ||
| /// </summary> | ||
| public class ConfigurationRetrievalContext | ||
| { | ||
| /// <summary> | ||
| /// Gets or sets a value indicating whether to bypass the cache when retrieving configuration. | ||
| /// </summary> | ||
| public bool BypassCache { get; set; } | ||
| } |
27 changes: 27 additions & 0 deletions
27
...Microsoft.IdentityModel.Protocols/Configuration/IConfigurationEventHandlerContextAware.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| using System.Threading; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace Microsoft.IdentityModel.Protocols.Configuration; | ||
|
|
||
| /// <summary> | ||
| /// Defines event handlers for configuration retrieval and update operations. | ||
| /// </summary> | ||
| /// <typeparam name="T">The type of configuration.</typeparam> | ||
| public interface IConfigurationEventHandlerContextAware<T> : IConfigurationEventHandler<T> where T : class | ||
| { | ||
| /// <summary> | ||
| /// Called before retrieving configuration from the metadata endpoint. | ||
| /// </summary> | ||
| /// <param name="metadataAddress">The metadata endpoint address.</param> | ||
| /// <param name="context">The context for the configuration retrieval operation, providing additional information and control.</param> | ||
| /// <param name="cancellationToken">A cancellation token to observe while waiting for the task to complete.</param> | ||
| /// <returns> | ||
| /// A <see cref="ConfigurationEventHandlerResult{T}"/> if valid and available, or <see cref="ConfigurationEventHandlerResult{T}.NoResult"/> to proceed with normal retrieval. | ||
| /// </returns> | ||
| Task<ConfigurationEventHandlerResult<T>> BeforeRetrieveAsync(string metadataAddress, ConfigurationRetrievalContext context, CancellationToken cancellationToken = default); | ||
|
|
||
| // AfterUpdateAsync does not require context, but can be added here if needed in the future. | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.