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
Copy file name to clipboardExpand all lines: README.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -403,6 +403,7 @@ channel name as `channel` and the new count of subscriptions for this client as
403
403
404
404
`MULTI` commands are queued up until an `EXEC` is issued, and then all commands are run atomically by
405
405
Redis. The interface in `node_redis` is to return an individual `Multi` object by calling `client.multi()`.
406
+
If any command fails to queue, all commands are rolled back and none is going to be executed (For further information look at [transactions](http://redis.io/topics/transactions)).
406
407
407
408
```js
408
409
var redis =require("./index"),
@@ -485,6 +486,12 @@ client.multi([
485
486
console.log(replies);
486
487
});
487
488
```
489
+
## client.batch([commands])
490
+
491
+
`BATCH` commands are queued up until an `EXEC` is issued, and then all commands are run atomically by
492
+
Redis. The interface in `node_redis` is to return an individual `Batch` object by calling `client.batch()`.
493
+
The only difference between .batch and .multi is that no transaction is going to be used.
494
+
Be aware that the errors are - just like in multi statements - in the result. Otherwise both, errors and results could be returned at the same time.
Copy file name to clipboardExpand all lines: changelog.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
Changelog
2
2
=========
3
3
4
-
## v.2.2.0 - xx, 2015
4
+
## v.2.2.0 - 07, 2015 - The peregrino falcon
5
5
6
6
Features
7
7
@@ -11,6 +11,13 @@ Features
11
11
- exchanging built in queue with [Petka Antonov's](@petkaantonov)[double-ended queue](https://github.com/petkaantonov/deque)
12
12
- prevent polymorphism
13
13
- optimize statements
14
+
- Added .batch command, similar to multi but without transaction (@BridgeAR)
15
+
- Improved pipelining to minimize the [RTT](http://redis.io/topics/pipelining) further (@BridgeAR)
16
+
17
+
This release is mainly focusing on further speed improvements and we can proudly say that node_redis is very likely outperforming any other node redis client.
18
+
19
+
If you do not rely on transactions but want to reduze the RTT you can use .batch from now on. It'll behave just the same as .multi but it does not have any transaction and therefor won't roll back any failed commands.
20
+
Both .multi and .batch are from now on going to fire the commands in bulk without doing any other operation in between.
0 commit comments