eval 执行 lua 报错 user_script:1: @user_script: 1: Lua redis() command arguments must be strings or integers

2022-05-11 22:09:18 +08:00
 UnrealEngine

ERR Error running script (call to f_a08c9c69b7c07ae2485190873b90d128a23e502d): @user_script:1: @user_script: 1: Lua redis() command arguments must be strings or integers

报错来源自

Connection->command('eval', array('return redis.call('exists',KEYS[1])<1 and redis.call('setex',KEYS[1],ARGV[2],ARGV[1])', 1, 'cache:8e3a74c63406753fa072630e7112b312ffc42b99', 0, 60))

已经懵了,问其他同事也不知道原因,只能找万能的 v 友了

1469 次点击
所在节点    PHP
1 条回复
willchen
2022-05-12 09:19:09 +08:00
试一下 tonumber(ARGV[2])

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/852279

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX