diff --git a/Classes/Controller/CompanyController.php b/Classes/Controller/CompanyController.php index 2a5341b..58f768a 100644 --- a/Classes/Controller/CompanyController.php +++ b/Classes/Controller/CompanyController.php @@ -74,7 +74,7 @@ public function listAction(string $letter = ''): ResponseInterface 'categories' => $this->categoryRepository->findRelated(), ]); - CacheUtility::addPageCacheTagsByQuery($this->request, $companies->getQuery()); + CacheUtility::addPageCacheTagsByQuery($companies->getQuery(), $this->request); return $this->htmlResponse(); } @@ -92,7 +92,7 @@ public function listMyCompaniesAction(): ResponseInterface 'categories' => $this->categoryRepository->findRelated(), ]); - CacheUtility::addPageCacheTagsByQuery($this->request, $companies->getQuery()); + CacheUtility::addPageCacheTagsByQuery($companies->getQuery(), $this->request); return $this->htmlResponse(); } @@ -104,7 +104,7 @@ public function showAction(int $company): ResponseInterface 'company' => $companyObject, ]); - CacheUtility::addCacheTagsByCompanyRecords($this->request, [$companyObject]); + CacheUtility::addCacheTagsByCompanyRecords([$companyObject], $this->request); return $this->htmlResponse(); } diff --git a/Classes/Utility/CacheUtility.php b/Classes/Utility/CacheUtility.php index fa73eac..2ac3c49 100644 --- a/Classes/Utility/CacheUtility.php +++ b/Classes/Utility/CacheUtility.php @@ -26,7 +26,7 @@ class CacheUtility * Following cache tags will be added to TSFE: * "tx_yellowpages2_uid_[company:uid]" */ - public static function addCacheTagsByCompanyRecords(ServerRequestInterface $request, array $companyRecords): void + public static function addCacheTagsByCompanyRecords(array $companyRecords, ServerRequestInterface $request): void { if (!self::getApplicationType()->isFrontend()) { return; @@ -51,7 +51,7 @@ public static function addCacheTagsByCompanyRecords(ServerRequestInterface $requ * Adds page cache tags by used storagePages. * This adds tags with the scheme tx_yellowpages2_pid_[company:pid] */ - public static function addPageCacheTagsByQuery(ServerRequestInterface $request, QueryInterface $query): void + public static function addPageCacheTagsByQuery(QueryInterface $query, ServerRequestInterface $request): void { if (!self::getApplicationType()->isFrontend()) { return;