aspnetcore-redis-rate-limiting icon indicating copy to clipboard operation
aspnetcore-redis-rate-limiting copied to clipboard

RedisConcurrencyRateLimiter should use async Redis call to release the lease

Open cristipufu opened this issue 1 year ago • 0 comments

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);
}

cristipufu avatar Nov 06 '22 14:11 cristipufu