Skip to content

Commit

Permalink
Merge pull request #362 from nesk/patch-1
Browse files Browse the repository at this point in the history
Bypass cache for exposed routes in debug mode
  • Loading branch information
tobias-93 committed Dec 1, 2019
2 parents 47554a9 + dcfde60 commit 6793326
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Controller/Controller.php
Expand Up @@ -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());
Expand Down

0 comments on commit 6793326

Please sign in to comment.