azure-sdk-for-cpp
azure-sdk-for-cpp copied to clipboard
Cache reading of the assertion file to WorkloadIdentityCredential
Currently, we read the assertion file on each GetToken()
call. This is typically a relatively fast process, since the file content is small. Consider caching that, with a 10 minute cache invalidation timeout, similar to what GoLang does:
https://github.com/Azure/azure-sdk-for-cpp/blob/ec33085d5922d57351a42062a1b6a0ce1350b857/sdk/identity/azure-identity/src/workload_identity_credential.cpp#L147-L152
https://github.com/Azure/azure-sdk-for-go/blob/5f029fd307e2b078175c29bf09667a19f26fbf53/sdk/azidentity/workload_identity.go#L101-L125
Open Question: What do other languages do here?