[TASK] Filter duplicate cache commands from CacheQueue 69/54569/2
authorBenjamin Rannow <b.rannow@familie-redlich.de>
Mon, 6 Nov 2017 11:58:49 +0000 (12:58 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 7 Nov 2017 13:44:20 +0000 (14:44 +0100)
under the right condition multiple duplicate cache commands are executed

for Example: save a record in Backend can course multiple 'pages'
commands will be executed, if the record has inline records.

flushing '20' times the 'pages' cache is unnecessary.

Resolves: #82930
Releases: master, 8.7
Change-Id: I69e581cb7f12acbd8172b2ca88e89f93ebfbe4b4
Reviewed-on: https://review.typo3.org/54569
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>

index f3a3e1f..3d04982 100644 (file)
@@ -8335,6 +8335,8 @@ class DataHandler implements LoggerAwareInterface
         $cacheManager = $this->getCacheManager();
         $cacheManager->flushCachesInGroupByTags('pages', array_keys($tagsToClear));
+        // Filter duplicate cache commands from cacheQueue
+        $clearCacheCommands = array_unique($clearCacheCommands);
         // Execute collected clear cache commands from page TSConfig
         foreach ($clearCacheCommands as $command) {