/** * Setup doctrine cache * * @return void */ protected function setDoctrineCache() { static::$cacheDriver = static::getCacheDriverByOptions(\XLite::getInstance()->getOptions('cache')); $this->configuration->setMetadataCacheImpl(static::$cacheDriver); $this->configuration->setQueryCacheImpl(static::$cacheDriver); $this->configuration->setResultCacheImpl(static::$cacheDriver); }
/** * Get cache driver * * @return \XLite\Core\Cache\Registry */ public static function getCacheDriver() { if (null === static::$cacheDriver) { static::$cacheDriver = new \XLite\Core\Cache\Registry('datacache'); } return static::$cacheDriver; }
/** * Setup doctrine cache * * @return void */ protected function setDoctrineCache() { static::$cacheDriver = new \XLite\Core\Cache(); $driver = static::$cacheDriver->getDriver(); $this->configuration->setMetadataCacheImpl($driver); $this->configuration->setQueryCacheImpl($driver); $this->configuration->setResultCacheImpl($driver); }