connect method

Future<void> connect()
override

Connect to Redis

Implementation

Future<void> connect() async {
  _connection = RedisConnection();
  _client = await _connection.connect(_host, _port);

  if (_password != null) {
    await _client.send_object(['AUTH', _password!]);
  }

  if (_database != 0) {
    await _client.send_object(['SELECT', _database]);
  }
}