From 2fd5f3f1ebb8c8133ee4beed5413368dcaca901f Mon Sep 17 00:00:00 2001 From: Patrick Schriner <patrick.schriner@diemedialen.de> Date: Wed, 29 Apr 2020 11:49:18 +0200 Subject: [PATCH] [TASK] Add tags to clearcachehook To prevent the necessity to duplicate logic of the datahandler tags are passed to the hook. Resolves: #91231 Releases: master, 9.5 Change-Id: I437f40d4bdb9c786eeaa46be279e22a3ebb5b90b Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64344 Reviewed-by: Benni Mack <benni@typo3.org> Reviewed-by: Georg Ringer <georg.ringer@gmail.com> Tested-by: TYPO3com <noreply@typo3.com> Tested-by: Benni Mack <benni@typo3.org> Tested-by: Georg Ringer <georg.ringer@gmail.com> --- typo3/sysext/core/Classes/DataHandling/DataHandler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php index 39328f985b96..1e630708148a 100644 --- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php +++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php @@ -8211,7 +8211,7 @@ class DataHandler implements LoggerAwareInterface $clearCacheCommands = array_unique($commands); } // Call post processing function for clear-cache: - $_params = ['table' => $table, 'uid' => $uid, 'uid_page' => $pageUid, 'TSConfig' => $TSConfig]; + $_params = ['table' => $table, 'uid' => $uid, 'uid_page' => $pageUid, 'TSConfig' => $TSConfig, 'tags' => $tagsToClear]; foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'] ?? [] as $_funcRef) { GeneralUtility::callUserFunction($_funcRef, $_params, $this); } @@ -8316,7 +8316,7 @@ class DataHandler implements LoggerAwareInterface } // Call post processing function for clear-cache: - $_params = ['cacheCmd' => strtolower($cacheCmd)]; + $_params = ['cacheCmd' => strtolower($cacheCmd), 'tags' => $tagsToFlush]; foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearCachePostProc'] ?? [] as $_funcRef) { GeneralUtility::callUserFunction($_funcRef, $_params, $this); } -- GitLab