Exemple #1
0
 /**
  * 批量判断键值是否存在
  * @param array $keys   键名数组
  * @return array  返回存在的keys
  */
 public function mHas($keys)
 {
     try {
         $hasKeys = [];
         foreach ($keys as $key) {
             if ($this->handler->exists($key)) {
                 $hasKeys[] = $key;
             }
         }
         return $hasKeys;
     } catch (RedisException $ex) {
         self::exception($ex);
         //连接状态置为false
         $this->isConnected = false;
     }
     return false;
 }