The Redis Incr command increments the numeric value stored in the key by one. If the key does not exist, the value of the key will be initialized to 0 first, and then the INCR operation will be executed, and the valid time of the key will be set to be valid for a long time.
for example:
$result = $redis->incr($key);
//???
if ($redis->exists($key)) {
$redis->expire($key, $setTmout);
}
If it happens to be at the question mark, the key just expires