Home > Backend Development > PHP Tutorial > redis里multi与pipeline的区别

redis里multi与pipeline的区别

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:43:03
Original
1674 people have browsed it

redis处理批量请求有两种命令,一种是multi一种是pipeline,它们有什么区别呢?主要的使用场景又分别适合什么?

redis能像mongodb那样在服务端执行脚本吗,比如我要根据一个值是否存在来决定是否去做下一步操作,这种简单的判断,必须有两次请求,是否有简单的命令来合并呢?

回复内容:

redis处理批量请求有两种命令,一种是multi一种是pipeline,它们有什么区别呢?主要的使用场景又分别适合什么?

redis能像mongodb那样在服务端执行脚本吗,比如我要根据一个值是否存在来决定是否去做下一步操作,这种简单的判断,必须有两次请求,是否有简单的命令来合并呢?

pipeline 只是把多个redis指令一起发出去,redis并没有保证这些指定的执行是原子的;multi相当于一个redis的transaction的。

redis可以支持lua脚本的执行

Related labels:
Statement of this Website
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
Latest Issues
php redis connection problem
From 1970-01-01 08:00:00
0
0
0
About a small error in the redis manual
From 1970-01-01 08:00:00
0
0
0
python2.7 - django cannot connect to redis
From 1970-01-01 08:00:00
0
0
0
I can't connect to redis using php
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template