Redis种如何执行lua文件


我看到的所有教程都是用eval 指令后面接一段lua脚本,我尝试eval <lua文件> <参数>时,例如:eval hello.lua 0
提示
“ ERR Error compiling script (new function): user_script:1: '=' expected near 'end'”
即使我的hello.lua文件中只有一句 return "hello world"

Redis nosql lua

浅月0oo 8 years, 9 months ago

恕我愚昧。Redis不是用来做缓存的吗?难道还能用来跑脚本吗?
另外,错误提示说语句末端应该是=号

sohuren answered 8 years, 9 months ago

Your Answer