long2ice / fastapi-limiter

A request rate limiter for fastapi

Home Page:https://github.com/long2ice/fastapi-limiter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Written inside the request interface, only one takes effect

goophps opened this issue · comments

Written inside the request interface, only one takes effect:
rate_limiter = RateLimiter(5, seconds=10)
await rate_limiter(request, Response())

 rate_limiter2 = RateLimiter(60, hours=1)
 await rate_limiter2(request, Response())

The reason is found because the keys generated in redis are the same