mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Merge pull request #53453 from nextcloud/fix/do-not-cache-routes-on-debug-mode
fix(router): In debug mode, cache routes only for 3 seconds
This commit is contained in:
commit
763873e152
2 changed files with 2 additions and 2 deletions
|
|
@ -80,7 +80,7 @@ class CachingRouter extends Router {
|
|||
if (!$cachedRoutes) {
|
||||
parent::loadRoutes();
|
||||
$cachedRoutes = $this->serializeRouteCollection($this->root);
|
||||
$this->cache->set($key, $cachedRoutes, 3600);
|
||||
$this->cache->set($key, $cachedRoutes, ($this->config->getSystemValueBool('debug') ? 3 : 3600));
|
||||
}
|
||||
$matcher = new CompiledUrlMatcher($cachedRoutes, $this->context);
|
||||
$this->eventLogger->start('cacheroute:url:match', 'Symfony URL match call');
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class Router implements IRouter {
|
|||
public function __construct(
|
||||
protected LoggerInterface $logger,
|
||||
IRequest $request,
|
||||
private IConfig $config,
|
||||
protected IConfig $config,
|
||||
protected IEventLogger $eventLogger,
|
||||
private ContainerInterface $container,
|
||||
protected IAppManager $appManager,
|
||||
|
|
|
|||
Loading…
Reference in a new issue