Skip to content

Support of ioredis v4+ and redis v4+

Compare
Choose a tag to compare
@animir animir released this 29 Aug 10:41
· 140 commits to master since this release

I have really great news!
rate-limiter-flexible supports ioredis v4+ and redis v4+ now.
We have been waiting for this moment for years.

Thanks to @roggervalf. And one big thank you from me personally

Since this is major release, there are

BREAKING CHANGES:

  1. rate-limiter-flexible works with ioredis package of any version (tested versions 2, 3, 4 and 5) by default now.
  • If you want it to work with the redis package version 4 or later, you should set useRedisPackage flag.
  • If you created redis client with legacyMode: true, you should remove it.
  • If you use redis of version 3 or lower, you should stick to rate-limiter-flexible version 2. Or try the experimental useRedis3AndLowerPackage option.
  1. deprecated options started with lowercased inmemory prefix are removed. You can use inMemoryBlockOnConsumed and
    inMemoryBlockDuration instead.
  2. deprecated redis option for RateLimiterRedis was removed. (Most likely you never heard about it, since it was deprecated years ago). You should use storeClient option instead.