Scripts

EVAL_RO

Evaluate a read-only Lua script server side.

Arguments

scriptbodystringrequired

The read-only lua script to run.

keysbodystring[]required

All of the keys accessed in the script

argsbodyunknown[]required

All of the arguments you passed to the script

Response

anyrequired

The result of the script.

Example
const script = `    return ARGV[1]`const result = await redis.evalRo(script, [], ["hello"]);console.log(result) // "hello"
Loading search…