You've already forked node-redis
mirror of
https://github.com/redis/node-redis.git
synced 2025-08-06 02:15:48 +03:00
deprecate QUIT
and disconnect
, implement close
and destroy
This commit is contained in:
@@ -41,9 +41,7 @@ To override just a specific option, use the following functions:
|
||||
|
||||
The `QUIT` command has been deprecated in Redis 7.2 and should now also be considered deprecated in Node-Redis. Instead of sending a `QUIT` command to the server, the client can simply close the network connection.
|
||||
|
||||
Rather than using `client.quit()`, your code should use `client.close()` or `client.disconnect()`.
|
||||
|
||||
TODO difference between `close` and `disconnect`...
|
||||
`client.QUIT/quit()` is replaced by `client.close()`. and, to avoid confusion, `client.disconnect()` has been renamed to `client.destroy()`.
|
||||
|
||||
## Scan Iterators
|
||||
|
||||
@@ -62,7 +60,7 @@ const client = createClient(),
|
||||
// use `client` for the new API
|
||||
await client.set('key', 'value');
|
||||
|
||||
// use `legacyClient` for the "legacy" callback API
|
||||
// use `legacyClient` for the "legacy" API
|
||||
legacyClient.set('key', 'value', (err, reply) => {
|
||||
// ...
|
||||
});
|
||||
|
Reference in New Issue
Block a user