Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
41 | protected function multiSave(array $values, int $ttl = null): bool |
||
42 | { |
||
43 | $multi = $this->redis->multi(\Redis::PIPELINE); |
||
44 | foreach ($values as $key => $value) { |
||
45 | $multi->set($key, \serialize($value), $ttl ?? $this->getDefaultTTLSeconds()); |
||
46 | } |
||
47 | |||
48 | return !empty($this->redis->exec()); |
||
49 | } |
||
61 |