Lua脚本
lua
local value = redis.call('GET', KEYS[1])
if not value then
redis.call('SET', KEYS[1], ARGV[1])
return 1
end
return 0