我已使用SCRIPT LOAD
命令将Lua脚本加载到Redis中,并使用EVALSHA
执行它。但是,脚本在1周后被删除。除SCRIPT FLUSH
之外还有其他方法可以删除脚本吗?脚本是否在重新启动之间持久存在?
答案 0 :(得分:2)
Is there any other way other than SCRIPT FLUSH to remove the script?
For now, the answer is no.
Are the script persistence between reboots?
No:
Also, as already mentioned, restarting a Redis instance flushes the script cache, which is not persistent. However from the point of view of the client there are only two ways to make sure a Redis instance was not restarted between two different commands.
The application layer should be responsible of loading scripts to Redis after a reboot.