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

Letting Memory Cache takes care of the locks cause of concurrent requ… #115

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

paulcaru
Copy link

Improving GetToken Method by removing lock and letting Microsoft Memory Cache handle this as it wasn't handled well for concurrency

paulcaru and others added 5 commits April 18, 2024 19:45
1) All Waiting for Lock if Token is Null
2) First goes in Checks Again Memory Cache
3) Nothing is found and calls GetTokenFromServer and fetches token
4) Lock is released and 2nd one goes in. checks Memory Cache and its found
5) Return Token
1) All Waiting for Lock if Token is Null
2) First goes in Checks Again Memory Cache
3) Nothing is found and calls GetTokenFromServer and fetches token
4) Lock is released and 2nd one goes in. checks Memory Cache and its found
5) Return Token
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.

1 participant