Skip to content

Commit

Permalink
Update Module.php
Browse files Browse the repository at this point in the history
  • Loading branch information
buliq authored Mar 1, 2017
1 parent 450b469 commit 4274f15
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CirclicalAutoWire/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ public function onBootstrap(MvcEvent $mvcEvent)
$writer = new PhpArray();
$writer->toFile($config['circlical']['autowire']['compile_to'], $routeConfig, true);
$routerService->reset();

/** @var \Zend\ModuleManager\Listener\ConfigListener $cfg */
$cfg = $serviceLocator->get(\Zend\ModuleManager\ModuleManager::class)->getEvent()->getConfigListener();
if ($productionMode && $cfg->getOptions()->getConfigCacheEnabled() && file_exists($cfg->getOptions()->getConfigCacheFile())) {
@unlink($cfg->getOptions()->getConfigCacheFile());
}
}
}
}

0 comments on commit 4274f15

Please sign in to comment.