Home>Article>Database> Does redis support transactions?

Does redis support transactions?

藏色散人
藏色散人 Original
2019-06-11 11:28:49 7734browse

Redis is an open source log-type Key-Value database written in ANSI C language, supports network, can be memory-based and persistent, and provides APIs in multiple languages. (Recommended: "Redis Video Tutorial")

Does redis support transactions?

Does redis support transactions?

Redis supports transactions.

DISCARD
Cancel the transaction and abandon the execution of all commands within the transaction block.

EXEC
Execute all commands within the transaction block.

MULTI
Marks the beginning of a transaction block.

UNWATCH
Cancel the monitoring of all keys by the WATCH command.

WATCH key [key ...]
Monitor one (or more) keys. If this (or these) keys are changed by other commands before the transaction is executed, then The transaction will be interrupted.

The above is the detailed content of Does redis support transactions?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn