Redis
type. You should register this type for injection in your Application.boot()
. It conforms to Service
so you can do so with the config
function.
Socket
s to the initializer. Connections will be distributed across the instances.
Redis
conforms to RediStack.RedisClient
meaning that by default, it has functions around nearly all Redis commands.
You can easily get and set a value.
command
. The first argument is the command name, all subsequent arguments are the command’s arguments.
.eval(...)
.
Scripts are written in Lua and have access to 1-based arrays KEYS
and ARGV
for accessing keys and arguments respectively. They also have access to a redis
variable for calling Redis inside the script. Consult the EVAL documentation for more information on scripting.
publish
and subscribe
commands to publish and listen to various channels.
You can easily subscribe to a single channel or multiple channels.
unsubscribe
.
psubscribe
.
punsubscribe
.
transaction()
function which provides a wrapper around Redis’ native MULTI
& EXEC
commands.