Easy Tutorial
❮ Lists Lindex Sets Sadd ❯

Redis Eval Command

Redis Scripting

The Redis Eval command executes scripts using the Lua interpreter.

Syntax

The basic syntax of the redis Eval command is as follows:

redis 127.0.0.1:6379> EVAL script numkeys key [key ...] arg [arg ...]

Parameter description:

Available Versions

= 2.6.0

Example

redis 127.0.0.1:6379> eval "return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}" 2 key1 key2 first second
1) "key1"
2) "key2"
3) "first"
4) "second"

Redis Scripting

❮ Lists Lindex Sets Sadd ❯