From 9bf430788e99cb65cdcbda293d1049b9e9062cc5 Mon Sep 17 00:00:00 2001 From: Esteban Zeller Date: Thu, 9 Mar 2023 10:47:56 -0300 Subject: [PATCH] Fix error with purge when doing cache:clean --- src/Model/PurgeCache.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Model/PurgeCache.php b/src/Model/PurgeCache.php index ccc7167..60cb8ab 100644 --- a/src/Model/PurgeCache.php +++ b/src/Model/PurgeCache.php @@ -18,7 +18,7 @@ use Magento\PageCache\Model\Cache\Server; use Magento\PageCache\Model\Config; use Magento\Store\Model\ScopeInterface; -use Zend\Uri\Uri; +use Laminas\Uri\Uri; /** * Class PurgeCache @@ -75,7 +75,10 @@ public function sendPoolPurgeRequest(string $poolTag): bool $socketAdapter = $this->socketAdapterFactory->create(); $servers = $this->cacheServer->getUris(); $socketAdapter->setOptions(['timeout' => 10]); - $headers = ['X-Pool' => $poolTag]; + $headers = [ + 'X-Pool' => $poolTag, + 'X-Magento-Tags-Pattern' => '.*' + ]; foreach ($servers as $server) { $headers['Host'] = $server->getHost();