lua 原子锁

local key=KEYS[1]local orderId=ARGV[1]local timeout=ARGV[2]if (redis.call("exists",key) == 1) then   return falseelse   redis.call("hmset",key,"orderId",orderId,"ver","-1")   redis.call("expire",key,timeout)   return trueend
原子   lua
发表评论
留言与评论(共有 0 条评论) “”
   
验证码:

相关文章

推荐文章