Revert "[BUGFIX] Memory consumption in DataHandler->processClearCacheQueue" 21/35221/2
authorOliver Hader <oliver.hader@typo3.org>
Wed, 10 Dec 2014 09:33:59 +0000 (10:33 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 10 Dec 2014 09:34:33 +0000 (10:34 +0100)
This reverts commit 31518c96e9c705a91898cce009d7f47be238bce7.

Change-Id: I64053da1d04716679c9e7227a9d6885ccd047fdb
Reviewed-on: http://review.typo3.org/35221
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/core/Classes/DataHandling/DataHandler.php

index de2165d..65a0b36 100644 (file)
@@ -7070,12 +7070,13 @@ 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] = TRUE;
+                                                       $tagsToClear[] = 'pageId_' . $pageId;
                                                }
                                        }
                                        // Queue delete cache for current table and record
-                                       $tagsToClear[$table] = TRUE;
-                                       $tagsToClear[$table . '_' . $uid] = TRUE;
+                                       $tagsToClear[] = $table;
+                                       $tagsToClear[] = $table . '_' . $uid;
+                                       $tagsToClear = array_unique($tagsToClear);
                                }
                                // Clear cache for pages entered in TSconfig:
                                if (!empty($TSConfig['clearCacheCmd'])) {
@@ -7095,7 +7096,7 @@ class DataHandler {
 
                /** @var \TYPO3\CMS\Core\Cache\CacheManager $cacheManager */
                $cacheManager = $this->getCacheManager();
-               foreach ($tagsToClear as $tag => $unusedValue) {
+               foreach ($tagsToClear as $tag) {
                        $cacheManager->flushCachesInGroupByTag('pages', $tag);
                }