Class: RedisClientConfig
redis/src.RedisClientConfig
Extends
Constructors
new RedisClientConfig()
new RedisClientConfig():
RedisClientConfig
Returns
Inherited from
Properties
autoPipeliningIgnoredCommands
autoPipeliningIgnoredCommands?:
string
[]
Default
[]
Inherited from
RedisCommonConfig
.autoPipeliningIgnoredCommands
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
Inherited from
RedisCommonConfig
.autoResendUnfulfilledCommands
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
Inherited from
RedisCommonConfig
.autoResubscribe
Source
libs/redis/src/lib/config/redis-common.config.ts:91
commandTimeout
commandTimeout:
number
=5000
Inherited from
RedisCommonConfig
.commandTimeout
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
Inherited from
RedisCommonConfig
.connectTimeout
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.
Link
https://redis.io/commands/client-setname
Inherited from
RedisCommonConfig
.connectionName
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
Inherited from
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
Inherited from
RedisCommonConfig
.enableAutoPipelining
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
Inherited from
RedisCommonConfig
.enableOfflineQueue
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
Inherited from
RedisCommonConfig
.enableReadyCheck
Source
libs/redis/src/lib/config/redis-common.config.ts:203
host
host?:
string
Inherited from
Source
libs/redis/src/lib/config/redis-common.config.ts:21
keepAlive
keepAlive:
number
=0
Enable/disable keep-alive functionality.
Link
https://nodejs.org/api/net.html#socketsetkeepaliveenable-initialdelay
Default
0
Inherited from
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
Inherited from
Source
libs/redis/src/lib/config/redis-common.config.ts:214
maxLoadingRetryTime
maxLoadingRetryTime:
number
=10_000
Default
10000
Inherited from
RedisCommonConfig
.maxLoadingRetryTime
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
Inherited from
RedisCommonConfig
.maxRetriesPerRequest
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
Inherited from
Source
libs/redis/src/lib/config/redis-common.config.ts:133
namespace
namespace?:
string
Source
libs/redis/src/lib/config/redis-client.config.ts:11
noDelay
noDelay:
boolean
=true
Enable/disable the use of Nagle's algorithm.
Link
https://nodejs.org/api/net.html#socketsetnodelaynodelay
Default
true
Inherited from
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.
Inherited from
Source
libs/redis/src/lib/config/redis-common.config.ts:71
path
path?:
string
Source
libs/redis/src/lib/config/redis-client.config.ts:15
port
port?:
number
Inherited from
Source
libs/redis/src/lib/config/redis-common.config.ts:28
readOnly
readOnly:
boolean
=false
Default
false
Inherited from
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
Inherited from
RedisCommonConfig
.stringNumbers
Source
libs/redis/src/lib/config/redis-common.config.ts:115
url
url?:
string
Source
libs/redis/src/lib/config/redis-client.config.ts:7
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.
Inherited from
Source
libs/redis/src/lib/config/redis-common.config.ts:65
Generated using typedoc-plugin-markdown and TypeDoc