vutran1710 / PyrateLimiter

⚔️Python Rate-Limiter using Leaky-Bucket Algorithm Family
https://pyratelimiter.readthedocs.io
MIT License
349 stars 36 forks source link

Redis cache doesn't expire #74

Closed maximepeabody closed 2 years ago

maximepeabody commented 2 years ago

It seems that the data being stored when using redis doesn't expire. For rate limiting, there's no need to store the data for longer than the rate denominator (i.g, @ 500 requests per hour, you can expire the cache after 1 hour if no additional request comes in).

We are using this, and it's causing our cache to blow up as more and more users use our app.

vutran1710 commented 2 years ago

good point. I'll look into the problem soon.

vutran1710 commented 2 years ago

Fixed in #82