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

[trivial] IdempotencyRequestCache: Preparation work #9577

Merged

Conversation

kiminuo
Copy link
Collaborator

@kiminuo kiminuo commented Nov 19, 2022

Preparation for #9469

@kiminuo kiminuo marked this pull request as ready for review November 19, 2022 09:53
@@ -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);
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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.

@kiminuo kiminuo requested a review from molnard November 21, 2022 08:33
Copy link
Collaborator

@adamPetho adamPetho left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@molnard molnard left a comment

Choose a reason for hiding this comment

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

tACK

@molnard molnard merged commit d60fb4d into WalletWasabi:master Nov 22, 2022
@kiminuo kiminuo deleted the feature/2022-11-19-IRC-simplifications branch November 22, 2022 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants