A Ruby client that supports the experimental scripting feature in Redis.
Drop your Lua scripts in
scripts/ ├── msadd.lua └── sintercard.lua
Then initialize the connection to Redis, passing the path where the class should look for scripts:
require "redis/scripted" redis = Redis::Scripted.connect(scripts_path: "./scripts")
The scripts are defined as instance methods for convenience:
redis.msadd(["foo"], ["s1", "s2", "s3"])
msadd receives two arguments at most: one array for the keys
and another for the values. This is necessary because of how
The class also exposes the
evalsha methods if you want to
call them yourself.