Skip to content

Commit 89b94b9

Browse files
authored
store result of routesAreCached (#57687)
1 parent 8cc0f32 commit 89b94b9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Illuminate/Foundation/Application.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,8 +1326,11 @@ public function getCachedConfigPath()
13261326
*/
13271327
public function routesAreCached()
13281328
{
1329-
return ($this->bound('routes.cached') && $this->make('routes.cached') === true) ||
1330-
$this['files']->exists($this->getCachedRoutesPath());
1329+
if ($this->bound('routes.cached')) {
1330+
return (bool) $this->make('routes.cached');
1331+
}
1332+
1333+
return $this->instance('routes.cached', $this['files']->exists($this->getCachedRoutesPath()));
13311334
}
13321335

13331336
/**

0 commit comments

Comments
 (0)