nikolaposa / rate-limit

🚔 General purpose rate limiter implementation.
MIT License
269 stars 47 forks source link

Method to have custom time range #48

Open rishabhdave opened 3 years ago

rishabhdave commented 3 years ago

Hi,

First of all a very nice and compact library. I would like to know if there's any option/method where I can rate limit for custom time. For example every 5 minutes, every 25 minutes etc. It would be good to have that option.

Thanks

nikolaposa commented 3 years ago

Thanks!

There is a custom rate limit strategy, take a look at: https://github.com/nikolaposa/rate-limit/blob/master/src/Rate.php#L46. I might document that in README.