Example #1
0
 /**
  * Clears URL cache for records.
  *
  * Currently only clears URL cache for pages but should also clear alias
  * cache for records later.
  *
  * @param array $parameters
  * @return void
  */
 public function clearUrlCacheForRecords(array $parameters)
 {
     if ($parameters['table'] == 'pages' && MathUtility::canBeInterpretedAsInteger($parameters['uid'])) {
         $cacheInstance = CacheFactory::getCache();
         $cacheInstance->clearUrlCacheForPage($parameters['uid']);
     }
 }
Example #2
0
 /**
  * Returns the cache to use.
  *
  * @return CacheInterface
  */
 public function getCache()
 {
     if (TYPO3_MODE !== 'FE' || is_object($GLOBALS['BE_USER']) || ConfigurationReader::getInstance()->get('cache/disable')) {
         $cache = GeneralUtility::makeInstance('DmitryDulepov\\Realurl\\Cache\\NullCache');
     } else {
         $cache = CacheFactory::getCache();
     }
     return $cache;
 }
Example #3
0
 /**
  * Initializes the class.
  */
 public function __construct()
 {
     $this->cache = CacheFactory::getCache();
     $this->databaseConnection = $GLOBALS['TYPO3_DB'];
 }
Example #4
0
 /**
  * Returns the cache to use.
  *
  * @return CacheInterface
  */
 public function getCache()
 {
     $cache = CacheFactory::getCache();
     return $cache;
 }