From 54541bd7cd42ea3f649fdea5365c1223cfc0b3b6 Mon Sep 17 00:00:00 2001 From: Jochen Date: Mon, 2 Jun 2025 16:45:38 +0200 Subject: [PATCH] [TASK] Catch error while flushing cache tags When flushing the cache of a lot of tags a user might reach the SQL query limit. This error will now be caught and logged. --- Build/phpunit/FunctionalTestsBootstrap.php | 1 + Build/phpunit/UnitTestsBootstrap.php | 1 + Classes/Cache/Backend/ReverseProxyCacheBackend.php | 8 +++++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Build/phpunit/FunctionalTestsBootstrap.php b/Build/phpunit/FunctionalTestsBootstrap.php index 443197d..29a4cbb 100644 --- a/Build/phpunit/FunctionalTestsBootstrap.php +++ b/Build/phpunit/FunctionalTestsBootstrap.php @@ -1,4 +1,5 @@ reverseProxyProvider->flushCacheForUrls($urls); } - parent::flushByTags($tags); + try { + parent::flushByTags($tags); + } catch (\Throwable $e) { + $this->logger->error('Failed to flush ' . count($tags) . ' tags. SQL query limit exceeded. See the list of all tags ' . implode(', ', $tags)); + } } /**