Ejemplo n.º 1
0
 /**
  * @param array $keys
  *
  * @return array
  */
 public function getMulti(array $keys)
 {
     if (count($keys) === 0) {
         return $keys;
     }
     $transformedKeys = [];
     foreach ($keys as $key) {
         $transformedKeys[] = $this->getKeyName($key);
     }
     $values = array_combine($transformedKeys, $this->client->mget($transformedKeys));
     $this->addMultiReadAccessStats($keys);
     return $values;
 }
Ejemplo n.º 2
0
 /**
  * @group redis-strings
  */
 public function testMultipleGet()
 {
     $this->client->mset(array('foo' => 'bar', 'hello' => 'world'));
     $this->assertEquals(array('bar', 'world'), $this->client->mget('foo', 'hello'));
 }