Commit 0f2f447e authored by Stephan Großberndt's avatar Stephan Großberndt Committed by Markus Klein
Browse files

[BUGFIX] Memory consumption in DataHandler->processClearCacheQueue

Reduce memory consumption in DataHandler->processClearCacheQueue() for
bulk inserts by filling $tagsToClear as an associative array instead of
a normal array with array_unique()-call after each added record.

Resolves: #63615
Releases: master, 6.2
Change-Id: I1f557f435088cab3aa928ec3f44b0ded9265d7a7
Reviewed-on: http://review.typo3.org/35085


Reviewed-by: default avatarLukas Krieger <lukas.krieger@me.com>
Tested-by: default avatarLukas Krieger <lukas.krieger@me.com>
Reviewed-by: default avatarStefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Alexander Opitz's avatarAlexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz's avatarAlexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: default avatarMarkus Klein <klein.t3@reelworx.at>
Tested-by: default avatarMarkus Klein <klein.t3@reelworx.at>
parent 31f050bc
......@@ -6920,13 +6920,12 @@ class DataHandler {
// point to real pages and caches at all. Flushing caches for
// those records does not make sense and decreases performance
if ($pageId >= 0) {
$tagsToClear[] = 'pageId_' . $pageId;
$tagsToClear['pageId_' . $pageId] = TRUE;
}
}
// Queue delete cache for current table and record
$tagsToClear[] = $table;
$tagsToClear[] = $table . '_' . $uid;
$tagsToClear = array_unique($tagsToClear);
$tagsToClear[$table] = TRUE;
$tagsToClear[$table . '_' . $uid] = TRUE;
}
// Clear cache for pages entered in TSconfig:
if (!empty($TSConfig['clearCacheCmd'])) {
......@@ -6946,7 +6945,7 @@ class DataHandler {
/** @var \TYPO3\CMS\Core\Cache\CacheManager $cacheManager */
$cacheManager = $this->getCacheManager();
foreach ($tagsToClear as $tag) {
foreach ($tagsToClear as $tag => $unusedValue) {
$cacheManager->flushCachesInGroupByTag('pages', $tag);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment