Reputation: 2544
for example
I have several set
commands, and I don't care the return value of them, in my lua script, I have to write several redis.call('set', key, val)
.
Is there any way like pipeline, so I can do them together. Maybe more efficient?
Upvotes: 3
Views: 3289
Reputation: 50112
No - there's no way to pipeline Redis calls from a Lua script, or batch them. Note that calling redis.call
is very efficient so you shouldn't worry too much about that anyway.
As @deltheil pointed out, you can however "group" multiple calls to the same command if you use its variadic form. While of less importance for Lua scripts, this is definitely the recommend practice.
Upvotes: 6