Commit 8e907ef2 authored by 马 川's avatar 马 川
Browse files

predis 和 phpredis在sadd()方法上采取不同的传参方式

parent 46829b41
Tags 4.1.15
No related merge requests found
Pipeline #8556 failed with stage
Showing with 5 additions and 1 deletion
......@@ -50,7 +50,11 @@ class UserCache
$pipe->set($key, $value);
}
}
$pipe->sadd($keys[0], $keys);
if (config('database.redis.client') == 'phpredis') {
$pipe->sadd($keys[0], ...$keys);
} else {
$pipe->sadd($keys[0], $keys);
}
if ($expires = $this->redis->getExpires()) {
foreach ($keys as $key) $pipe->expire($key, $expires);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment