-
Notifications
You must be signed in to change notification settings - Fork 25
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
permitCount paramater values larger than 1 are currently not supported #36
Comments
An additional missing feature resulting from the same problem is as follows: According to the definitions of I would be happy to know if there is any workaround to check the actual state of the permits without acquiring a lease. |
@guynoga47 please open a separate issue for your scenario and link the definitions |
@cristipufu do you plan to support this? Are you willing to accept a pull request? |
@manuelspezzani yes of course |
The parameter permitCount is passed to both AttemptAcquire and AcquireAsync in the RateLimiter abstract base class that all rate limiters in this library are are implementing.
The definition for this paramater is as follows:
<param name="permitCount">Number of permits to try and acquire.</param>
(See for instance here: https://github.com/dotnet/runtime/blob/43a60c8ed073a4c6134facadd01c9c1c2643e41a/src/libraries/System.Threading.RateLimiting/src/System/Threading/RateLimiting/RateLimiter.cs#L60)
Yet, all the provided classes disregard this parameter value, as in here:
aspnetcore-redis-rate-limiting/src/RedisRateLimiting/SlidingWindow/RedisSlidingWindowRateLimiter.cs
Lines 51 to 59 in 808c7d8
In some cases, a hard coded value of 1D is then passed on instead of the parameter, as in here:
aspnetcore-redis-rate-limiting/src/RedisRateLimiting/FixedWindow/RedisFixedWindowManager.cs
Lines 56 to 67 in bdca17f
Are there plans to solve this?
Also, If this is currently a known limitation of this library (fair), please provide a warning in the documentation.
Thanks.
The text was updated successfully, but these errors were encountered: