You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> :warning: In version 4.1.0 we moved our subpackages from `@node-redis` to `@redis`. If you're just using `npm install redis`, you don't need to do anything—it'll upgrade automatically. If you're using the subpackages directly, you'll need to point to the new scope (e.g. `@redis/client` instead of `@node-redis/client`).
40
+
> :warning: In version 4.1.0, we moved our subpackages from `@node-redis` to `@redis`. If you're just using `npm install redis`, you don't need to do anything—it'll upgrade automatically. If you're using the subpackages directly, you'll need to point to the new scope (e.g. `@redis/client` instead of `@node-redis/client`).
41
41
42
42
## Installation
43
43
@@ -127,7 +127,7 @@ await client.hGetAll(
127
127
128
128
### Unsupported Redis Commands
129
129
130
-
If you want to run commands and/or use arguments that Node Redis doesn't know about (yet!) use `.sendCommand()`:
130
+
If you want to run commands and/or use arguments that Node Redis doesn't know about (yet!), use `.sendCommand()`:
There are two functions that disconnect a client from the Redis server. In most scenarios you should use `.quit()` to ensure that pending commands are sent to Redis before closing a connection.
293
+
There are two functions that disconnect a client from the Redis server. In most scenarios, you should use `.quit()` to ensure that pending commands are sent to Redis before closing a connection.
Of course, if you don't do something with your Promises you're certain to get [unhandled Promise exceptions](https://nodejs.org/api/process.html#process_event_unhandledrejection). To take advantage of auto-pipelining and handle your Promises, use `Promise.all()`.
330
+
Of course, if you don't do something with your Promises, you're certain to get [unhandled Promise exceptions](https://nodejs.org/api/process.html#process_event_unhandledrejection). To take advantage of auto-pipelining and handle your Promises, use `Promise.all()`.
Copy file name to clipboardExpand all lines: docs/client-configuration.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ When the socket closes unexpectedly (without calling `.quit()`/`.disconnect()`),
34
34
2.`number` -> wait for `X` milliseconds before reconnecting.
35
35
3.`(retries: number, cause: Error) => false | number | Error` -> `number` is the same as configuring a `number` directly, `Error` is the same as `false`, but with a custom error.
36
36
37
-
By default the strategy is `Math.min(retries * 50, 500)`, but it can be overwritten like so:
37
+
By default, the strategy is `Math.min(retries * 50, 500)`, but it can be overwritten like so:
38
38
39
39
```javascript
40
40
createClient({
@@ -48,7 +48,7 @@ createClient({
48
48
49
49
To enable TLS, set `socket.tls` to `true`. Below are some basic examples.
50
50
51
-
> For configuration options see [tls.connect](https://nodejs.org/api/tls.html#tlsconnectoptions-callback) and [tls.createSecureContext](https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions), as those are the underlying functions used by this library.
51
+
> For configuration options, see [tls.connect](https://nodejs.org/api/tls.html#tlsconnectoptions-callback) and [tls.createSecureContext](https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions), as those are the underlying functions used by this library.
Copy file name to clipboardExpand all lines: docs/clustering.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ const value = await cluster.get('key');
44
44
## Auth with password and username
45
45
46
46
Specifying the password in the URL or a root node will only affect the connection to that specific node. In case you want to set the password for all the connections being created from a cluster instance, use the `defaults` option.
Copy file name to clipboardExpand all lines: docs/isolated-execution.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Sometimes you want to run your commands on an exclusive connection. There are a
8
8
9
9
Below are several examples of how to use isolated execution.
10
10
11
-
> NOTE: Behind the scenes we're using [`generic-pool`](https://www.npmjs.com/package/generic-pool) to provide a pool of connections that can be isolated. Go there to learn more.
11
+
> NOTE: Behind the scenes, we're using [`generic-pool`](https://www.npmjs.com/package/generic-pool) to provide a pool of connections that can be isolated. Go there to learn more.
Things get a little more complex with transactions. Here we are `.watch()`ing some keys. If the keys change during the transaction, a `WatchError` is thrown when `.exec()` is called:
26
+
Things get a little more complex with transactions. Here, we are `.watch()`ing some keys. If the keys change during the transaction, a `WatchError` is thrown when `.exec()` is called:
Copy file name to clipboardExpand all lines: docs/v3-to-v4.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ The configuration object passed to `createClient` has changed significantly with
16
16
17
17
### No Auto Connect
18
18
19
-
In V4, the client does not automatically connect to the server. Instead you need to run `.connect()` after creating the client or you will receive an error: `ClientClosedError: The client is closed`.
19
+
In V4, the client does not automatically connect to the server. Instead, you need to run `.connect()` after creating the client or you will receive an error: `ClientClosedError: The client is closed`.
20
20
21
21
```typescript
22
22
import { createClient } from'redis';
@@ -50,9 +50,9 @@ In V4, you don't need to add a listener to the `message`-like events (items 5 to
50
50
51
51
The second argument of these commands is a callback, which will be triggered every time there is a message published to the channel.
52
52
53
-
The third argument to these commands is a boolean to set `bufferMode` (default `false`). If it's set to `true` you will receive a buffer instead of a string.
53
+
The third argument to these commands is a boolean to set `bufferMode` (default `false`). If it's set to `true`, you will receive a buffer instead of a string.
54
54
55
-
The `subscribe`-like commands return a promise. If the command is executed successfully the promise will be fulfilled, otherwise the promise will be rejected.
55
+
The `subscribe`-like commands return a promise. If the command is executed successfully, the promise will be fulfilled, otherwise the promise will be rejected.
0 commit comments