-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommonRedisOptions.html
85 lines (85 loc) · 52 KB
/
CommonRedisOptions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>CommonRedisOptions | ioredis</title><meta name="description" content="Documentation for ioredis"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">ioredis</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">ioredis</a></li><li><a href="CommonRedisOptions.html">CommonRedisOptions</a></li></ul><h1>Interface CommonRedisOptions</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">CommanderOptions</span><ul class="tsd-hierarchy"><li><span class="target">CommonRedisOptions</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#Connector" class="tsd-kind-icon">Connector</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#autoPipeliningIgnoredCommands" class="tsd-kind-icon">auto<wbr/>Pipelining<wbr/>Ignored<wbr/>Commands</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#autoResendUnfulfilledCommands" class="tsd-kind-icon">auto<wbr/>Resend<wbr/>Unfulfilled<wbr/>Commands</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#autoResubscribe" class="tsd-kind-icon">auto<wbr/>Resubscribe</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#commandQueue" class="tsd-kind-icon">command<wbr/>Queue</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#commandTimeout" class="tsd-kind-icon">command<wbr/>Timeout</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#connectTimeout" class="tsd-kind-icon">connect<wbr/>Timeout</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#connectionName" class="tsd-kind-icon">connection<wbr/>Name</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#db" class="tsd-kind-icon">db</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#enableAutoPipelining" class="tsd-kind-icon">enable<wbr/>Auto<wbr/>Pipelining</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#enableOfflineQueue" class="tsd-kind-icon">enable<wbr/>Offline<wbr/>Queue</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#enableReadyCheck" class="tsd-kind-icon">enable<wbr/>Ready<wbr/>Check</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#keepAlive" class="tsd-kind-icon">keep<wbr/>Alive</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="CommonRedisOptions.html#keyPrefix" class="tsd-kind-icon">key<wbr/>Prefix</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#lazyConnect" class="tsd-kind-icon">lazy<wbr/>Connect</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#maxLoadingRetryTime" class="tsd-kind-icon">max<wbr/>Loading<wbr/>Retry<wbr/>Time</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#maxRetriesPerRequest" class="tsd-kind-icon">max<wbr/>Retries<wbr/>Per<wbr/>Request</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#monitor" class="tsd-kind-icon">monitor</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#noDelay" class="tsd-kind-icon">no<wbr/>Delay</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#offlineQueue" class="tsd-kind-icon">offline<wbr/>Queue</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#password" class="tsd-kind-icon">password</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#readOnly" class="tsd-kind-icon">read<wbr/>Only</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#reconnectOnError" class="tsd-kind-icon">reconnect<wbr/>On<wbr/>Error</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#scripts" class="tsd-kind-icon">scripts</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="CommonRedisOptions.html#showFriendlyErrorStack" class="tsd-kind-icon">show<wbr/>Friendly<wbr/>Error<wbr/>Stack</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#stringNumbers" class="tsd-kind-icon">string<wbr/>Numbers</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#username" class="tsd-kind-icon">username</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-interface"><a href="CommonRedisOptions.html#retryStrategy" class="tsd-kind-icon">retry<wbr/>Strategy</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="Connector" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> Connector<a href="#Connector" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Connector<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">ConnectorConstructor</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L9">redis/RedisOptions.ts:9</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="autoPipeliningIgnoredCommands" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> auto<wbr/>Pipelining<wbr/>Ignored<wbr/>Commands<a href="#autoPipeliningIgnoredCommands" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">auto<wbr/>Pipelining<wbr/>Ignored<wbr/>Commands<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L140">redis/RedisOptions.ts:140</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>default</dt><dd><p>[]</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="autoResendUnfulfilledCommands" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> auto<wbr/>Resend<wbr/>Unfulfilled<wbr/>Commands<a href="#autoResendUnfulfilledCommands" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">auto<wbr/>Resend<wbr/>Unfulfilled<wbr/>Commands<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L68">redis/RedisOptions.ts:68</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Whether or not to resend unfulfilled commands on reconnect.
Unfulfilled commands are most likely to be blocking commands such as <code>brpop</code> or <code>blpop</code>.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>true</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="autoResubscribe" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> auto<wbr/>Resubscribe<a href="#autoResubscribe" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">auto<wbr/>Resubscribe<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L61">redis/RedisOptions.ts:61</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>When the client reconnects, channels subscribed in the previous connection will be
resubscribed automatically if <code>autoResubscribe</code> is <code>true</code>.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>true</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="commandQueue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> command<wbr/>Queue<a href="#commandQueue" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">command<wbr/>Queue<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L142">redis/RedisOptions.ts:142</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="commandTimeout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> command<wbr/>Timeout<a href="#commandTimeout" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">command<wbr/>Timeout<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L16">redis/RedisOptions.ts:16</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>If a command does not return a reply within a set number of milliseconds,
a "Command timed out" error will be thrown.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="connectTimeout" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> connect<wbr/>Timeout<a href="#connectTimeout" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">connect<wbr/>Timeout<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L107">redis/RedisOptions.ts:107</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>How long the client will wait before killing a socket due to inactivity during initial connection.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>10000</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="connectionName" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> connection<wbr/>Name<a href="#connectionName" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">connection<wbr/>Name<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L36">redis/RedisOptions.ts:36</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the name of the connection to make it easier to identity the connection
in client list.</p>
</div><dl class="tsd-comment-tags"><dt>link</dt><dd><p><a href="https://redis.io/commands/client-setname">https://redis.io/commands/client-setname</a></p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="db" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> db<a href="#db" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">db<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L54">redis/RedisOptions.ts:54</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Database index to use.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>0</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="enableAutoPipelining" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> enable<wbr/>Auto<wbr/>Pipelining<a href="#enableAutoPipelining" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">enable<wbr/>Auto<wbr/>Pipelining<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L136">redis/RedisOptions.ts:136</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>default</dt><dd><p>false</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="enableOfflineQueue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> enable<wbr/>Offline<wbr/>Queue<a href="#enableOfflineQueue" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">enable<wbr/>Offline<wbr/>Queue<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L154">redis/RedisOptions.ts:154</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>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 <code>enableReadyCheck</code> 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.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>true</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="enableReadyCheck" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> enable<wbr/>Ready<wbr/>Check<a href="#enableReadyCheck" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">enable<wbr/>Ready<wbr/>Check<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L163">redis/RedisOptions.ts:163</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>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 <code>ready</code> event.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>true</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="keepAlive" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> keep<wbr/>Alive<a href="#keepAlive" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">keep<wbr/>Alive<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L22">redis/RedisOptions.ts:22</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Enable/disable keep-alive functionality.</p>
</div><dl class="tsd-comment-tags"><dt>link</dt><dd><p><a href="https://nodejs.org/api/net.html#socketsetkeepaliveenable-initialdelay">https://nodejs.org/api/net.html#socketsetkeepaliveenable-initialdelay</a></p>
</dd><dt>default</dt><dd><p>0</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="keyPrefix" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> key<wbr/>Prefix<a href="#keyPrefix" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">key<wbr/>Prefix<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from CommanderOptions.keyPrefix</p><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/utils/Commander.ts#L12">utils/Commander.ts:12</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="lazyConnect" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> lazy<wbr/>Connect<a href="#lazyConnect" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">lazy<wbr/>Connect<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L173">redis/RedisOptions.ts:173</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>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 <code>redis.connect()</code> is called
explicitly.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>false</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="maxLoadingRetryTime" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> max<wbr/>Loading<wbr/>Retry<wbr/>Time<a href="#maxLoadingRetryTime" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">max<wbr/>Loading<wbr/>Retry<wbr/>Time<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L132">redis/RedisOptions.ts:132</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>default</dt><dd><p>10000</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="maxRetriesPerRequest" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> max<wbr/>Retries<wbr/>Per<wbr/>Request<a href="#maxRetriesPerRequest" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">max<wbr/>Retries<wbr/>Per<wbr/>Request<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L127">redis/RedisOptions.ts:127</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>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 <code>retryStrategy</code> option).
This option is used to configure how many reconnection attempts should be allowed before
the queue is flushed with a <code>MaxRetriesPerRequestError</code> error.
Set this options to <code>null</code> instead of a number to let commands wait forever
until the connection is alive again.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>20</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="monitor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> monitor<a href="#monitor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">monitor<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L115">redis/RedisOptions.ts:115</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>This option is used internally when you call <code>redis.monitor()</code> to tell Redis
to enter the monitor mode when the connection is established.</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>false</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="noDelay" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> no<wbr/>Delay<a href="#noDelay" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">no<wbr/>Delay<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L29">redis/RedisOptions.ts:29</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Enable/disable the use of Nagle's algorithm.</p>
</div><dl class="tsd-comment-tags"><dt>link</dt><dd><p><a href="https://nodejs.org/api/net.html#socketsetnodelaynodelay">https://nodejs.org/api/net.html#socketsetnodelaynodelay</a></p>
</dd><dt>default</dt><dd><p>true</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="offlineQueue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> offline<wbr/>Queue<a href="#offlineQueue" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">offline<wbr/>Queue<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L141">redis/RedisOptions.ts:141</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="password" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> password<a href="#password" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">password<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L47">redis/RedisOptions.ts:47</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>If set, client will send AUTH command with the value of this option when connected.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="readOnly" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> read<wbr/>Only<a href="#readOnly" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">read<wbr/>Only<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L95">redis/RedisOptions.ts:95</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>default</dt><dd><p>false</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="reconnectOnError" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> reconnect<wbr/>On<wbr/>Error<a href="#reconnectOnError" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">reconnect<wbr/>On<wbr/>Error<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">ReconnectOnError</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L90">redis/RedisOptions.ts:90</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Whether or not to reconnect on certain Redis errors.
This options by default is <code>null</code>, which means it should never reconnect on Redis errors.
You can pass a function that accepts an Redis error, and returns:</p>
<ul>
<li><code>true</code> or <code>1</code> to trigger a reconnection.</li>
<li><code>false</code> or <code>0</code> to not reconnect.</li>
<li><code>2</code> to reconnect and resend the failed command (who triggered the error) after reconnection.</li>
</ul>
</div><dl class="tsd-comment-tags"><dt>example</dt><dd><pre><code class="language-js"><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">redis</span><span class="hl-1"> = </span><span class="hl-4">new</span><span class="hl-1"> </span><span class="hl-2">Redis</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-2">reconnectOnError</span><span class="hl-1">(</span><span class="hl-0">err</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-6">targetError</span><span class="hl-1"> = </span><span class="hl-3">"READONLY"</span><span class="hl-1">;</span><br/><span class="hl-1"> </span><span class="hl-7">if</span><span class="hl-1"> (</span><span class="hl-0">err</span><span class="hl-1">.</span><span class="hl-0">message</span><span class="hl-1">.</span><span class="hl-2">includes</span><span class="hl-1">(</span><span class="hl-0">targetError</span><span class="hl-1">)) {</span><br/><span class="hl-1"> </span><span class="hl-5">// Only reconnect when the error contains "READONLY"</span><br/><span class="hl-1"> </span><span class="hl-7">return</span><span class="hl-1"> </span><span class="hl-4">true</span><span class="hl-1">; </span><span class="hl-5">// or `return 1;`</span><br/><span class="hl-1"> }</span><br/><span class="hl-1"> },</span><br/><span class="hl-1">});</span>
</code></pre>
</dd><dt>default</dt><dd><p>null</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="scripts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> scripts<a href="#scripts" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">scripts<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-symbol">{ </span>lua<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>numberOfKeys<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span>readOnly<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L178">redis/RedisOptions.ts:178</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>default</dt><dd><p>undefined</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a id="showFriendlyErrorStack" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> show<wbr/>Friendly<wbr/>Error<wbr/>Stack<a href="#showFriendlyErrorStack" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">show<wbr/>Friendly<wbr/>Error<wbr/>Stack<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from CommanderOptions.showFriendlyErrorStack</p><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/utils/Commander.ts#L13">utils/Commander.ts:13</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="stringNumbers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> string<wbr/>Numbers<a href="#stringNumbers" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">string<wbr/>Numbers<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L101">redis/RedisOptions.ts:101</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>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 <code>Number.MAX_SAFE_INTEGER</code> === 2^53).</p>
</div><dl class="tsd-comment-tags"><dt>default</dt><dd><p>false</p>
</dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="username" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> username<a href="#username" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">username<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L42">redis/RedisOptions.ts:42</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>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.</p>
</div></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface"><a id="retryStrategy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagOptional">Optional</span> retry<wbr/>Strategy<a href="#retryStrategy" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface"><li class="tsd-signature tsd-kind-icon">retry<wbr/>Strategy<span class="tsd-signature-symbol">(</span>times<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/luin/ioredis/blob/9e6db7d/lib/redis/RedisOptions.ts#L10">redis/RedisOptions.ts:10</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>times: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="CommonRedisOptions.html" class="tsd-kind-icon">Common<wbr/>Redis<wbr/>Options</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#Connector" class="tsd-kind-icon">Connector</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#autoPipeliningIgnoredCommands" class="tsd-kind-icon">auto<wbr/>Pipelining<wbr/>Ignored<wbr/>Commands</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#autoResendUnfulfilledCommands" class="tsd-kind-icon">auto<wbr/>Resend<wbr/>Unfulfilled<wbr/>Commands</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#autoResubscribe" class="tsd-kind-icon">auto<wbr/>Resubscribe</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#commandQueue" class="tsd-kind-icon">command<wbr/>Queue</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#commandTimeout" class="tsd-kind-icon">command<wbr/>Timeout</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#connectTimeout" class="tsd-kind-icon">connect<wbr/>Timeout</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#connectionName" class="tsd-kind-icon">connection<wbr/>Name</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#db" class="tsd-kind-icon">db</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#enableAutoPipelining" class="tsd-kind-icon">enable<wbr/>Auto<wbr/>Pipelining</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#enableOfflineQueue" class="tsd-kind-icon">enable<wbr/>Offline<wbr/>Queue</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#enableReadyCheck" class="tsd-kind-icon">enable<wbr/>Ready<wbr/>Check</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#keepAlive" class="tsd-kind-icon">keep<wbr/>Alive</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="CommonRedisOptions.html#keyPrefix" class="tsd-kind-icon">key<wbr/>Prefix</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#lazyConnect" class="tsd-kind-icon">lazy<wbr/>Connect</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#maxLoadingRetryTime" class="tsd-kind-icon">max<wbr/>Loading<wbr/>Retry<wbr/>Time</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#maxRetriesPerRequest" class="tsd-kind-icon">max<wbr/>Retries<wbr/>Per<wbr/>Request</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#monitor" class="tsd-kind-icon">monitor</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#noDelay" class="tsd-kind-icon">no<wbr/>Delay</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#offlineQueue" class="tsd-kind-icon">offline<wbr/>Queue</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#password" class="tsd-kind-icon">password</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#readOnly" class="tsd-kind-icon">read<wbr/>Only</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#reconnectOnError" class="tsd-kind-icon">reconnect<wbr/>On<wbr/>Error</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#scripts" class="tsd-kind-icon">scripts</a></li><li class="tsd-kind-property tsd-parent-kind-interface tsd-is-inherited"><a href="CommonRedisOptions.html#showFriendlyErrorStack" class="tsd-kind-icon">show<wbr/>Friendly<wbr/>Error<wbr/>Stack</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#stringNumbers" class="tsd-kind-icon">string<wbr/>Numbers</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="CommonRedisOptions.html#username" class="tsd-kind-icon">username</a></li><li class="tsd-kind-method tsd-parent-kind-interface"><a href="CommonRedisOptions.html#retryStrategy" class="tsd-kind-icon">retry<wbr/>Strategy</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>