Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • RedisOptions
    • RedisLoaderHelperOptions

Index

Properties

Optional autoResendUnfulfilledCommands

autoResendUnfulfilledCommands: boolean

If true, client will resend unfulfilled commands(e.g. block commands) in the previous connection when reconnected. default: true.

Optional autoResubscribe

autoResubscribe: boolean

After reconnected, if the previous connection was in the subscriber mode, client will auto re-subscribe these channels. default: true.

Optional connectTimeout

connectTimeout: number

The milliseconds before a timeout occurs during the initial connection to the Redis server. default: 10000.

Optional connectionName

connectionName: string

Optional db

db: number

Database index to use.

Optional dropBufferSupport

dropBufferSupport: boolean

If you are using the hiredis parser, it's highly recommended to enable this option. Create another instance with dropBufferSupport disabled for other commands that you want to return binary instead of string

Optional enableOfflineQueue

enableOfflineQueue: boolean

By default, if there is no active connection to the Redis server, commands are added to a queue and are executed once the connection is "ready" (when enableReadyCheck is true, "ready" means the Redis server has loaded the database from disk, otherwise means the connection to the Redis server has been established). If this option is false, when execute the command when the connection isn't ready, an error will be returned.

Optional enableReadyCheck

enableReadyCheck: boolean

When a connection is established to the Redis server, the server might still be loading the database from disk. While loading, the server not respond to any commands. To work around this, when this option is true, ioredis will check the status of the Redis server, and when the Redis server is able to process commands, a ready event will be emitted.

Optional family

family: number

4 (IPv4) or 6 (IPv6), Defaults to 4.

Optional host

host: string

Optional keepAlive

keepAlive: number

TCP KeepAlive on the socket with a X ms delay before start. Set to a non-number value to disable keepAlive.

Optional keyPrefix

keyPrefix: string

Optional lazyConnect

lazyConnect: boolean

Optional logger

logger: statsLogger

Optional name

name: string

Optional password

password: string

If set, client will send AUTH command with the value of this option when connected.

Optional path

path: string

Local domain socket path. If set the port, host and family will be ignored.

Optional port

port: number

Optional readOnly

readOnly: boolean

Enable READONLY mode for the connection. Only available for cluster mode. default: false.

Optional sentinels

sentinels: Array<object>

Optional showFriendlyErrorStack

showFriendlyErrorStack: boolean

Whether to show a friendly error stack. Will decrease the performance significantly.

Optional tls

tls: object

Type declaration

  • ca: Buffer

Methods

Optional reconnectOnError

  • reconnectOnError(error: Error): boolean
  • Parameters

    • error: Error

    Returns boolean

Optional retryStrategy

  • retryStrategy(times: number): number | false
  • When the return value isn't a number, ioredis will stop trying to reconnect. Fixed in: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/15858

    Parameters

    • times: number

    Returns number | false

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc