Feature #17414
closedRootline caching mechanism
0%
Description
Rootline caching mechanism
Caching the function getRootLine will significantly speed up Typo3.
First we should implement advanced caching system for extensions (#17210). Then, here are the changes for t3lib/class.t3lib_page.php:525, function getRootLine:
BEFORE CODE:
// Splitting the $MP parameters if present
ADD CODE:
$hash = md5(serialize($this->uid).serialize($MP).serialize($ignoreMPerrors).serialize($selFields).serialize($GLOBALS['TSFE']->sys_language_uid));
$serData = $this->getHash($hash);
if ($serData) {
$output = unserialize($serData);
return $output;
}
BEFORE CODE:
return $output;
ADD CODE:
$this->storeHash($hash, serialize($output),'ROOTLINE', 'pages', $this->uid);
Note:
- Probably some additional/depending variables should be set when generating $hash.
- All page manipulation actions (delete, save, hide, move, rename, etc) should trigger clearing appropriate records (all from the rootlines of involved pages) from cache_hash table (class.t3lib_tcemain.php:5968 as described in #17210). This can be implemented as $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'] hook.
(issue imported from #M5844)