Created
April 16, 2026 09:57
-
-
Save kitzberger/985e7311c29dfdb524e0b63cf6620060 to your computer and use it in GitHub Desktop.
TYPO3 Cache Hook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| declare(strict_types=1); | |
| namespace Vendor\MyExtension\Hooks; | |
| use Psr\Log\LoggerAwareInterface; | |
| use Psr\Log\LoggerAwareTrait; | |
| use TYPO3\CMS\Core\DataHandling\DataHandler; | |
| class DataHandlerCacheFlushingHook implements LoggerAwareInterface | |
| { | |
| use LoggerAwareTrait; | |
| public function doSomething(array $parameters, DataHandler $dataHandler) | |
| { | |
| unset($parameters['TSConfig']); // remove this key because it's only flooding the logs! | |
| $this->logger->debug(print_r($parameters, true)); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc']['my_extension'] = \Vendor\MyExtension\Hooks\DataHandlerCacheFlushingHook::class . '->doSomething'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment