/** * Wrapper for buildBaseTcaFromSingleFiles handling caching. * * This builds 'base' TCA that is later overloaded by ext_tables.php. * * Use a cache file if exists and caching is allowed. * * This is an internal method. It is only used during bootstrap and * extensions should not use it! * * @param boolean $allowCaching Whether or not to load / create concatenated cache file * @return void * @access private */ public static function loadBaseTca($allowCaching = TRUE) { if ($allowCaching) { $cacheIdentifier = static::getBaseTcaCacheIdentifier(); /** @var $codeCache \TYPO3\CMS\Core\Cache\Frontend\PhpFrontend */ $codeCache = static::getCacheManager()->getCache('cache_core'); if ($codeCache->has($cacheIdentifier)) { // substr is necessary, because the php frontend wraps php code around the cache value $cacheData = unserialize(substr($codeCache->get($cacheIdentifier), 6, -2)); $GLOBALS['TCA'] = $cacheData['tca']; GeneralUtility::setSingletonInstance('TYPO3\\CMS\\Core\\Category\\CategoryRegistry', $cacheData['categoryRegistry']); } else { static::buildBaseTcaFromSingleFiles(); static::createBaseTcaCacheFile(); } } else { static::buildBaseTcaFromSingleFiles(); } }