Skip to content

Commit

Permalink
[TASK] Add tags to clearcachehook
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pschriner authored and georgringer committed Apr 30, 2020
1 parent 7a5752a commit 2fd5f3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions typo3/sysext/core/Classes/DataHandling/DataHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -8211,7 +8211,7 @@ protected function prepareCacheFlush($table, $uid, $pid)
$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);
}
Expand Down Expand Up @@ -8316,7 +8316,7 @@ public function clear_cacheCmd($cacheCmd)
}

// 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);
}
Expand Down

0 comments on commit 2fd5f3f

Please sign in to comment.