From c7ab2c3f9bee8b4f729b51c9569a53ca8c08d09d Mon Sep 17 00:00:00 2001 From: "andrevanzuydam@gmail.com" Date: Tue, 5 Dec 2023 08:43:47 +0200 Subject: [PATCH] Fix for middleware and cached result --- Tina4/Routing/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tina4/Routing/Router.php b/Tina4/Routing/Router.php index 7f269744..35ae6698 100644 --- a/Tina4/Routing/Router.php +++ b/Tina4/Routing/Router.php @@ -513,7 +513,7 @@ public function handleRoutes($method, $url, array $customHeaders=[], $customRequ } } else - if ($route["cached"]) { + if ($route["cached"] && empty($result)) { $cacheResult = $this->getCacheResponse($url.$method); if ($cacheResult !== null && $url !== "/cache/clear" && $url !== "/migrate" && $url !== "/migrate/create") { Debug::message("$this->GUID Got cached result for $url", TINA4_LOG_DEBUG);