--Redis_Args_SelectRate = 0 --Redis_Args_BValue = 1 --Redis_Args_CValue = 2 --Redis_Args_DValue = 3 --Redis_Args_Anchor = 4 --Redis_Args_Benefits = 5 --Redis_Args_BuyGifts = 6 --Redis_Args_Expire = 7 --Redis_Args_Max = Redis_Args_Expire + 1 local expire = tonumber(ARGV[#ARGV]) local keyLen = #KEYS - 1 local tf = {} local res = 0 for i = 1, keyLen do if ARGV[i] == "" then res = redis.call("DEL", KEYS[i]) if res == 0 then table.insert(tf, "(kne)") else table.insert(tf, "OK") end else res = redis.call("SETEx", KEYS[i], expire, ARGV[i]) table.insert(tf, res) end end return tf