Redis 与 Lua

  • 将 Lua 脚本内容加载到 redis, 得到返回的 sha1 值
./redis-cli  -a 12345678 script load "$(cat ipCount.lua)"

在这里插入图片描述

  • 检查 sha1 值的 Lua 脚本是否加载到 redis 中
script exists 9b0fb3acef8d5d5ca0f2600a2e6de4376727818e

在这里插入图片描述

  • 清除所有 Lua 脚本缓存
script flush
  • 杀死当前正在运行的 Lua 脚本
script kill
发布了130 篇原创文章 · 获赞 233 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/weixin_44367006/article/details/103297755