Skip to content

Add support for defining and running lua scripts as command

Compare
Choose a tag to compare
@thetutlage thetutlage released this 10 Dec 02:37
· 115 commits to develop since this release

Define command

import Redis from '@ioc:Adonis/Addons/Redis'

Redis.defineCommand('defineValue', {
  numberOfKeys: 1,
  lua: `redis.call('set', KEYS[1], ARGV[1])`,
})

await Redis.runCommand('defineValue', 'greeting', 'hello world')
  • feat: add support for defining custom lua commands 2ddc054
  • chore: update dependencies a720efd

Full Changelog: v7.0.10...v7.1.0