connect($config['redis']['host'], $config['redis']['port'])) { $redis = null; } } catch (Throwable $e) { $redis = null; } } return $redis; }