From dcfde60c5a4c2ed8ecaa29ef8bfc55b77fc995dc Mon Sep 17 00:00:00 2001 From: Johann Pardanaud Date: Thu, 26 Sep 2019 10:51:11 +0200 Subject: [PATCH] Bypass cache for exposed routes in debug mode --- Controller/Controller.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Controller/Controller.php b/Controller/Controller.php index c5c7c154..9f220789 100644 --- a/Controller/Controller.php +++ b/Controller/Controller.php @@ -77,7 +77,7 @@ public function indexAction(Request $request, $_format) $cache = new ConfigCache($this->exposedRoutesExtractor->getCachePath($request->getLocale()), $this->debug); - if (!$cache->isFresh()) { + if (!$cache->isFresh() || $this->debug) { $exposedRoutes = $this->exposedRoutesExtractor->getRoutes(); $serializedRoutes = $this->serializer->serialize($exposedRoutes, 'json'); $cache->write($serializedRoutes, $this->exposedRoutesExtractor->getResources());