Перейти до основного вмісту

Class: RedisCommonConfig

redis/src.RedisCommonConfig

Extended By​

Constructors​

new RedisCommonConfig()​

new RedisCommonConfig(): RedisCommonConfig

Returns​

RedisCommonConfig

Properties​

autoPipeliningIgnoredCommands​

autoPipeliningIgnoredCommands?: string[]

Default​

[]

Source​

libs/redis/src/lib/config/redis-common.config.ts:178


autoResendUnfulfilledCommands​

autoResendUnfulfilledCommands: boolean = true

Whether or not to resend unfulfilled commands on reconnect. Unfulfilled commands are most likely to be blocking commands such as brpop or blpop.

Default​

true

Source​

libs/redis/src/lib/config/redis-common.config.ts:99


autoResubscribe​

autoResubscribe: boolean = true

When the client reconnects, channels subscribed in the previous connection will be resubscribed automatically if autoResubscribe is true.

Default​

true

Source​

libs/redis/src/lib/config/redis-common.config.ts:91


commandTimeout​

commandTimeout: number = 5000

Source​

libs/redis/src/lib/config/redis-common.config.ts:17


connectTimeout​

connectTimeout: number = 10_000

How long the client will wait before killing a socket due to inactivity during initial connection.

Default​

10000

Source​

libs/redis/src/lib/config/redis-common.config.ts:124


connectionName​

connectionName: string

Set the name of the connection to make it easier to identity the connection in client list.

https://redis.io/commands/client-setname

Source​

libs/redis/src/lib/config/redis-common.config.ts:57


db​

db: number = 0

Redis databases are numbered from 0 to 15 and, by default, you connect to database 0 when you connect to your Redis instance. However, you can change the database you're using with the select command after you connect.

Default​

0

Source​

libs/redis/src/lib/config/redis-common.config.ts:83


enableAutoPipelining​

enableAutoPipelining: boolean = false

In auto pipelining mode, all commands issued during an event loop are enqueued in a pipeline automatically managed by ioredis. At the end of the iteration, the pipeline is executed and thus all commands are sent to the server at the same time. This feature can dramatically improve throughput and avoids HOL blocking. In our benchmarks, the improvement was between 35% and 50%.

Default​

false

Source​

libs/redis/src/lib/config/redis-common.config.ts:170


enableOfflineQueue​

enableOfflineQueue: boolean = true

By default, if the connection to Redis server has not been established, 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.

Default​

true

Source​

libs/redis/src/lib/config/redis-common.config.ts:192


enableReadyCheck​

enableReadyCheck: boolean = true

The client will sent an INFO command to check whether the server is still loading data from the disk ( which happens when the server is just launched) when the connection is established, and only wait until the loading process is finished before emitting the ready event.

Default​

true

Source​

libs/redis/src/lib/config/redis-common.config.ts:203


host​

host?: string

Source​

libs/redis/src/lib/config/redis-common.config.ts:21


keepAlive​

keepAlive: number = 0

Enable/disable keep-alive functionality.

https://nodejs.org/api/net.html#socketsetkeepaliveenable-initialdelay

Default​

0

Source​

libs/redis/src/lib/config/redis-common.config.ts:38


lazyConnect​

lazyConnect: boolean = false

When a Redis instance is initialized, a connection to the server is immediately established. Set this to true will delay the connection to the server until the first command is sent or redis.connect() is called explicitly.

Default​

false

Source​

libs/redis/src/lib/config/redis-common.config.ts:214


maxLoadingRetryTime​

maxLoadingRetryTime: number = 10_000

Default​

10000

Source​

libs/redis/src/lib/config/redis-common.config.ts:157


maxRetriesPerRequest​

maxRetriesPerRequest: number = 20

The commands that don't get a reply due to the connection to the server is lost are put into a queue and will be resent on reconnect (if allowed by the retryStrategy option). This option is used to configure how many reconnection attempts should be allowed before the queue is flushed with a MaxRetriesPerRequestError error. Set this options to null instead of a number to let commands wait forever until the connection is alive again.

Default​

20

Source​

libs/redis/src/lib/config/redis-common.config.ts:149


monitor​

monitor: boolean = false

This option is used internally when you call redis.monitor() to tell Redis to enter the monitor mode when the connection is established.

Default​

false

Source​

libs/redis/src/lib/config/redis-common.config.ts:133


noDelay​

noDelay: boolean = true

Enable/disable the use of Nagle's algorithm.

https://nodejs.org/api/net.html#socketsetnodelaynodelay

Default​

true

Source​

libs/redis/src/lib/config/redis-common.config.ts:47


password​

password?: string

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

Source​

libs/redis/src/lib/config/redis-common.config.ts:71


port​

port?: number

Source​

libs/redis/src/lib/config/redis-common.config.ts:28


readOnly​

readOnly: boolean = false

Default​

false

Source​

libs/redis/src/lib/config/redis-common.config.ts:106


stringNumbers​

stringNumbers: boolean = false

When enabled, numbers returned by Redis will be converted to JavaScript strings instead of numbers. This is necessary if you want to handle big numbers (above Number.MAX_SAFE_INTEGER === 2^53).

Default​

false

Source​

libs/redis/src/lib/config/redis-common.config.ts:115


username​

username?: string

If set, client will send AUTH command with the value of this option as the first argument when connected. This is supported since Redis 6.

Source​

libs/redis/src/lib/config/redis-common.config.ts:65


Generated using typedoc-plugin-markdown and TypeDoc