Пример #1
0
 /**
  * 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);
 }
Пример #2
0
 /**
  * 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;
 }
Пример #3
0
 /**
  * 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);
 }