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)
Updated by Oliver Hader over 17 years ago
I'd like to take a look at this. Could you please attach a patch file? Thanks!
Updated by John Angel over 17 years ago
Oliver, please use patch from #17210, then insert code above.
To-do:
- to check for additional variables for $hash,
- deleting cache entries on page manipulation actions, using function clear_extension_cache($table,$uid,true) from the patch.
Updated by Georg Ringer over 13 years ago
- Category deleted (
Communication) - Status changed from New to Resolved
- Target version deleted (
0)
rootline cache is implemented