From 40f76b72fd5bf64933e5f95f7a964c8283ebcf8a Mon Sep 17 00:00:00 2001
From: Simon Schmidt <sfs@marketing-factory.de>
Date: Wed, 7 Feb 2018 16:55:59 +0100
Subject: [PATCH] [TASK] Filter duplicate cache commands from cacheQueue

remove multiple calling for clear_cachecmd with the same page id

Resolves: #83797
Related: #82930
Releases: 7.6
Change-Id: I5740a33d3cf5dd5c7ccbe7166b9d0ba3e9ddeaee
Reviewed-on: https://review.typo3.org/55587
Reviewed-by: Daniel Klockenkaemper <dk@marketing-factory.de>
Tested-by: Daniel Klockenkaemper <dk@marketing-factory.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Guido Schmechel <littlegee@web.de>
Tested-by: Guido Schmechel <littlegee@web.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
---
 typo3/sysext/core/Classes/DataHandling/DataHandler.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/typo3/sysext/core/Classes/DataHandling/DataHandler.php b/typo3/sysext/core/Classes/DataHandling/DataHandler.php
index 39a046a35657..a2bbf7f102ce 100644
--- a/typo3/sysext/core/Classes/DataHandling/DataHandler.php
+++ b/typo3/sysext/core/Classes/DataHandling/DataHandler.php
@@ -7929,6 +7929,8 @@ class DataHandler
             $cacheManager->flushCachesInGroupByTag('pages', $tag);
         }
 
+        // Filter duplicate cache commands from cacheQueue
+        $clearCacheCommands = array_unique($clearCacheCommands);
         // Execute collected clear cache commands from page TSConfig
         foreach ($clearCacheCommands as $command) {
             $this->clear_cacheCmd($command);
-- 
GitLab