vertx / io.vertx.kotlin.redis / io.vertx.redis.RedisClient / evalScriptAwait

evalScriptAwait

suspend fun RedisClient.evalScriptAwait(script: Script, keys: List<String>, args: List<String>): JsonArray

Execute a Lua script server side. This method is a high level wrapper around EVAL and EVALSHA using the latter if possible, falling back to EVAL if the script is not cached by the server yet. According to Redis documentation, executed scripts are guaranteed to be in the script cache of a given execution of a Redis instance forever, which means typically the overhead incurred by optimistically sending EVALSHA is minimal, while improving performance and saving bandwidth compared to using EVAL every time.

Parameters

script - Lua script and its SHA1 digest

keys - List of keys

args - List of argument values

handler - Handler for the result of this call. group: scripting

Return