1
fuxinya 2019-09-04 08:12:51 +08:00 via Android
参见 https://grokbase.com/t/gg/redis-db/1281v06jyr/keys-that-expire-in-lua-scripts
Since a whole Lua script execution is a single client command, Redis will not actively expire keys while a Lua client script is being run. |
2
fuxinya 2019-09-04 08:23:09 +08:00 via Android
but if the TTL runs out and the script attempts to
access the key, Redis will notice the key is expired and act as if the key does not exist. |
3
Lax 2019-09-04 10:15:34 +08:00
那段 lua 太慢的话先把 ttl 续上几秒再执行。最好不要因为单条 lua 指令会 block 其它请求。
|