public function testMultiSetAndGetTtl() { $data = ['key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3']; $keys = array_keys($data); $this->assertEquals(3, $this->cache->mset($data, 10)); $this->assertEquals($data, $this->cache->mget($keys)); }
/** * {@inheritdoc} */ public function mset(array $data, $ttl = 0) { $result = $this->cache->mset($data, $ttl); if ($result) { foreach ($data as $key => $value) { $this->hot[$key] = $value; } } return $result; }