Updating RateLimit in database #169
-
I would like to allow one to update the database value for PermitLimit and Window. I implemented being able to update database values and put a breakpoint in GetPartition to see that it picked up the new PermitLimit and Window in the SlidingRateLimiterPolicy and I do see the request got the new values. The new values are sent to GetSlidingWindowRateLimiter. But these new values do not seem to be used. For example, I started out to allow 10 per minute. Then I updated the database to set 1 per minute. I do not see the request rejected when I issue more than 1 request after the update. However if I restart my application the new value will be used so the first original settings when the application starts up seem to be the only values available leading me to believe this is cached somewhere. I would like to be able to clear that cache and set the updated values. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @colbroth, |
Beta Was this translation helpful? Give feedback.
Hi @colbroth,
The AspNet RateLimiting middleware caches the rate limiters in-memory w/o an expiration date.
This is also related to #61