/** * 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']); } }
/** * 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; }
/** * Initializes the class. */ public function __construct() { $this->cache = CacheFactory::getCache(); $this->databaseConnection = $GLOBALS['TYPO3_DB']; }
/** * Returns the cache to use. * * @return CacheInterface */ public function getCache() { $cache = CacheFactory::getCache(); return $cache; }