Skip to content

Latest commit

 

History

History
32 lines (27 loc) · 479 Bytes

example-of-transactions-in-redis.md

File metadata and controls

32 lines (27 loc) · 479 Bytes

Using transactions in Redis

redis-cli
> MULTI
> INCR test
> INCR test
> EXEC
  • redis-cli - launch Redis CLI interface in interactive mode
  • MULTI - start transaction
  • INCR test - sample commands within transaction
  • EXEC - commit transaction

group: transaction

Example:

127.0.0.1:6379> MULTI
OK
127.0.0.1:6379> INCR test
QUEUED
127.0.0.1:6379> INCR test
QUEUED
127.0.0.1:6379> EXEC
1) (integer) 124
2) (integer) 125