-
Notifications
You must be signed in to change notification settings - Fork 492
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
[trivial] IdempotencyRequestCache
: Preparation work
#9577
[trivial] IdempotencyRequestCache
: Preparation work
#9577
Conversation
@@ -46,7 +46,7 @@ public async Task<RoundStateResponse> GetStatusAsync(RoundStateRequest request, | |||
public async Task<ConnectionConfirmationResponse> ConfirmConnectionAsync(ConnectionConfirmationRequest request, CancellationToken cancellationToken) | |||
{ | |||
var before = DateTimeOffset.UtcNow; | |||
var ret = await IdempotencyRequestCache.GetCachedResponseAsync(request, action: (request, token) => Arena.ConfirmConnectionAsync(request, token), cancellationToken); | |||
var ret = await IdempotencyRequestCache.GetCachedResponseAsync(request, action: Arena.ConfirmConnectionAsync, cancellationToken); |
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.
Recommended by an analyzer to remove an extra lamda.
@@ -95,6 +95,7 @@ public IdempotencyRequestCache(IMemoryCache cache) | |||
/// <para>Note that if there is a simultaneous request for the cache key, it is not stopped and its result is discarded.</para> | |||
/// </remarks> | |||
internal void Remove<TRequest>(TRequest cacheKey) | |||
where TRequest : notnull |
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.
To unify it. All other methods have it.
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.
LGTM
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.
tACK
Preparation for #9469