-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Caching ClaimsPrincipal during authentication and re-caching FileConfiguration objects in Consul and Disk File configuration repos
#1249
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
Conversation
ghost
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's Good
|
Hi Mohsen! What issue is this PR related to? |
|
@EngRajabi commented on May 30, 2020:
In comparison to what performance indicators was the current performance improved? |
|
I was in an enterprise project that used the reference token type. I had a performance problem. Because in every request, it needs to request the identity of the server. The problem was solved with this cache. |
EngRajabi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge conflict
Did you use Service Discovery + Identity Server setup, or classic setup + Identity Server Bearer Tokens? |
|
Unfortunately there are no builds for these commits! |
cd5675c to
0561ad5
Compare
src/Ocelot/Configuration/Repository/DiskFileConfigurationRepository.cs
Outdated
Show resolved
Hide resolved
c216cdf to
b458f0f
Compare
908d84f to
0678e7a
Compare
Why use cache in authentication middleware? That’s a risky approach for the official Ocelot repo. In my opinion, there should be no caching for authentication. Feel free to handle it however you like in your forked repo.
Authentication doesn’t take much time if the provider isn’t a remote system. With a local library, the authentication process completes in just a few CPU cycles, so there’s no need to cache the
The
Really? First, prove this by sharing the complete solution on GitHub ❗ |
Regarding
So, caching FileConfiguration isn’t necessary. Even if the Administration feature is used to update the ocelot.json file through the Administration API, ASP.NET configuration provider handles this at runtime, updating the object in DI, and the current state can be read from the IOptionsMonitor<FileConfiguration> service.
@RaynaldM @ggnaegi |
New Feature
Cache response access token
Motivation for New Feature