/** * @return \Doctrine\Common\Cache\CacheProvider */ public function getDriver() { if ($this->driver === null) { $this->driver = $this->cacheDriverFactory->create($this->namespace); } return $this->driver; }
/** * @throws \Doctrine\DBAL\DBALException */ protected function connect() { $config = new DBAL\Configuration(); if ($this->appMode === ApplicationMode::DEVELOPMENT) { $config->setSQLLogger(new SQLLogger($this->logger)); } $config->setResultCacheImpl($this->cacheDriverFactory->create('db-queries')); return DBAL\DriverManager::getConnection($this->connectionParams, $config); }