title: set was executed successfully in redis but get nothing
body: <p>I'm using phpredis in my program, store something in the redis server, get them when the same request comes(in the same day), but I always get empty result. Can anyone give me some enlightenment? Here is the code of Cache class I'm using:</p>
  
  <pre><code>&lt;?php
  class Cache
  {
      public static function getInstance()
      {
          static $instance = null;
          null == $instance &amp;&amp; $instance = new self();
          return $instance;
      }
  
      protected function __construct()
      {
      }
  
      protected function getR()
      {
          static $r = NULL;
          if (NULL == $r) {
              $r = new Redis();
              try {
                  $r-&gt;pconnect(HOST, PORT, 5);
              } catch(Exception $ex) {
                  //log
                  try {
                      $api-&gt;connect(HOST, PORT, 5);
                  } catch (Exception $ex) {
                      //log
                  }
              }
          }
  
          return $r;
      }
  
      public function getValue($key)
      {
          $result = array();
          $r = $this-&gt;getR();
          if(!empty($r)) {
              try{
                  $result = $r-&gt;hKeys($key);
                  $r-&gt;setTimeout($keys, 86400);
              } catch (Exception $ex){
                  //log
              }
          }
  
          return $result; // return true
      }
  
      public function setValue($key, $value)
      {
          $result = false;
          $r = $this-&gt;getR();
          if(!empty($r)) {
              try{
                  $result = $r-&gt;hMset($key, $value);
              } catch (Exception $ex){
                  //log
              }
          }
      }
  }
  ?&gt;
  </code></pre>
  
  <p>EDIT:<br>
  I checked the key-values with redis-cli, found something wired: the key-value data was stored in db 5 while I thought it should be in DB 0 by default without select statement, but the program retrieved db 0, of course nothing returned. Now I'm wondering why the data went to DB 5 given that I've not selected DB.</p>