Feature #99843
openOption to disable clearing sibling page cache (clearCache_pageSiblings)
0%
Description
We are currently running a installation with +40 languages. Saving pages kept getting slower lately.
After some research i came across the following behaviour:
Default is that when a page record is edited, the cache for itself, the parent, and siblings (same level) is cleared.
- Products
- Product A
- Product B
- Product C
- Information pages
- Information page 1
- Information page 2
Making a change on Product C page will always flush the cache on the Product A & B & C pages and its parent Products.
Including all the languages of those pages.
Its logical to me that Products (parent) cache is flushed.
Its not logical to me to flush all other Products on same level (siblings) since this could be over 1500 pages as is in our case.
An option called `clearCache_pageSiblings` would be nice for this.
Currently we've had to register a hook to solve this.
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearPageCacheEval'][] = \BeechIt\XXXX\Hooks\ClearPageCacheEvalHook::class . '->dataHandlerClearPageCacheEval';
class ClearPageCacheEvalHook { /** * @param $_params * @return void */ public function dataHandlerClearPageCacheEval(&$_params): void { if ($_params['functionID'] === 'clear_cache()' && $_params['table'] === 'pages') { $_params['pageIdArray'] = []; $_params['pageIdArray'][] = $_params['uid']; } } }
Updated by Sven Ignor over 1 year ago
- Related to Feature #100170: missing clearCache_pageSiblings added