github luin/ioredis v4.0.0-0

latest releases: v5.3.1, v5.3.0, v5.2.6...
pre-release4 years ago

Bug Fixes

  • Deprecated Redis() in favor of new Redis() (8e7c6f1)
  • don't add to the failover queue before ready (491546d)
  • solves vulnerabilities dependencies (2950b79)
  • Cluster: issues when setting enableOfflineQueue to false (#649) (cfe4258)


  • use native Promise instead of Bluebird, and allow users to switch back. (da60b8b)
  • add maxRetriesPerRequest option to limit the retries attempts per command (1babc13)
  • Redis#connect() will be resolved when status is ready (#648) (f0c600b)
  • add debug details for connection pool (9ec16b6)
  • wait for ready state before resolving cluster.connect() (7517a73)


  • Drop support for < node v6
  • Redis#connect() will be resolved when status is ready
    instead of connect:
const redis = new Redis({ lazyConnect: true })
redis.connect().then(() => {
  assert(redis.status === 'ready')
  • Cluster#connect() will be resolved when the connection
    status become ready instead of connect.
  • The maxRetriesPerRequest is set to 20 instead of null (same behavior as ioredis v3)
    by default. So when a redis server is down, pending commands won't wait forever
    until the connection become alive, instead, they only wait about 10s (depends on the
    retryStrategy option)
  • The new keyword is required explicitly. Calling Redis as a function like
    Redis(/* options /)is deprecated and will not be supported in the next major version, usenew Redis(/ options */)` instead.
  • This change makes all the code that rely on the features provided by Bluebird not working
    anymore. For example, redis.get('foo').timeout(500) now should be failed since the native
    Promise doesn't support the timeout method. You can switch back to the Bluebird
    implementation by setting Redis.Promise:
const Redis = require('ioredis')
Redis.Promise = require('bluebird')

const redis = new Redis()

// Use bluebird
assert.equal(redis.get().constructor, require('bluebird'))

// You can change the Promise implementation at any time:
Redis.Promise = global.Promise
assert.equal(redis.get().constructor, global.Promise)

Don't miss a new ioredis release

NewReleases is sending notifications on new releases.