Skip to content
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

Add details on disabling of token cache #38245

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

scottaddie
Copy link
Member

Fixes #38119

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@scottaddie scottaddie merged commit d7dd2e0 into main Aug 16, 2023
@scottaddie scottaddie deleted the scottaddie/disable-token-cache branch August 16, 2023 19:29
@@ -18,6 +18,10 @@ The in-memory token cache provided by the Azure Identity library is thread-safe.

**Note:** When Azure Identity library credentials are used with Azure service libraries (for example, Azure Blob Storage), the in-memory token caching is active in the `HttpPipeline` layer as well. All `TokenCredential` implementations are supported there, including custom implementations external to the Azure Identity library.

#### Disable caching

As there are many levels of cache, it's not possible to disable in-memory caching. However, the in-memory cache may be cleared by creating a new credential instance.
Copy link
Member

Choose a reason for hiding this comment

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

I think the exception here is when using DefaultAzureCredential without any options. That ends up being a static singleton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Add Section on Clearing Token Cache to TokenCache.md
4 participants