aspnetcore-redis-rate-limiting
aspnetcore-redis-rate-limiting copied to clipboard
RedisConcurrencyRateLimiter should use async Redis call to release the lease
https://github.com/dotnet/runtime/issues/77669
private void Release(ConcurencyLeaseContext leaseContext)
{
var database = _connectionMultiplexer.GetDatabase();
// how to use async? if only RateLimitLease would implement IAsyncDisposable
database.SortedSetRemove($"rl:{_partitionKey}", leaseContext.RequestId);
}