/** * Returns a new instance of a connection instance. * * @param mixed $profile Redis profile. * @param array $parameters Additional connection parameters. * @return WebdisConnection */ protected function getConnection(&$profile = null, array $parameters = array()) { $parameters = $this->getParameters($parameters); $profile = $this->getProfile(); $connection = new WebdisConnection($parameters); $connection->executeCommand($profile->createCommand('flushdb')); return $connection; }
/** * {@inheritdoc} */ protected function createConnectionWithParams($parameters) { $profile = $this->getCurrentProfile(); if (!$parameters instanceof ParametersInterface) { $parameters = $this->getParameters($parameters); } $connection = new WebdisConnection($parameters); $connection->executeCommand($profile->createCommand('flushdb')); return $connection; }