Redis processing batch Requests There are two kinds of commands, one is
multi
pipeline
, what's the difference between them? What are the main usage scenarios for each?
Can Redis execute scripts on the server like MongoDB, for example, if I want to decide whether to do the next operation based on whether a value exists or not, this simple judgment must have two requests, is there a simple command to merge?
Reply content:
Redis processing batch Requests There are two kinds of commands, one is multi
pipeline
, what's the difference between them? What are the main usage scenarios for each?
Can Redis execute scripts on the server like MongoDB, for example, if I want to decide whether to do the next operation based on whether a value exists or not, this simple judgment must have two requests, is there a simple command to merge?
Pipeline just sends out multiple REDIS instructions, and Redis does not guarantee that the specified execution is atomic; Multi is equivalent to a redis transaction.
Redis can support the execution of LUA scripts