From 8c60ebff30613c6ed3b45b40735dfcd6dc5989a6 Mon Sep 17 00:00:00 2001
From: Dutta-Sayan <sayan.dutta@innoraft.com>
Date: Mon, 4 Nov 2024 15:48:09 +0530
Subject: [PATCH] Issue #3485182: Moved the message code after clear cache
 code.

---
 src/Controller/NavigationExtraToolsController.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Controller/NavigationExtraToolsController.php b/src/Controller/NavigationExtraToolsController.php
index cb0882e..53a6904 100644
--- a/src/Controller/NavigationExtraToolsController.php
+++ b/src/Controller/NavigationExtraToolsController.php
@@ -104,8 +104,8 @@ final class NavigationExtraToolsController extends ControllerBase {
    * Flushes all caches.
    */
   public function flushAll() {
-    $this->messenger()->addMessage($this->t('All caches cleared.'));
     drupal_flush_all_caches();
+    $this->messenger()->addMessage($this->t('All caches cleared.'));
     return new RedirectResponse($this->reloadPage());
   }
 
-- 
GitLab