Skip to content

Commit

Permalink
Merge pull request #27389 from divand/allow_env_to_control_cache_serv…
Browse files Browse the repository at this point in the history
…ices_packages_and_routes_paths

[5.7] Allow ENV to control paths of cache files for services, packages and routes
  • Loading branch information
taylorotwell authored Feb 4, 2019
2 parents 04df2b4 + 102b4a1 commit b402b56
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ public function shouldSkipMiddleware()
*/
public function getCachedServicesPath()
{
return $this->bootstrapPath().'/cache/services.php';
return $_ENV['APP_SERVICES_CACHE'] ?? $this->bootstrapPath().'/cache/services.php';
}

/**
Expand All @@ -895,7 +895,7 @@ public function getCachedServicesPath()
*/
public function getCachedPackagesPath()
{
return $this->bootstrapPath().'/cache/packages.php';
return $_ENV['APP_PACKAGES_CACHE'] ?? $this->bootstrapPath().'/cache/packages.php';
}

/**
Expand Down Expand Up @@ -935,7 +935,7 @@ public function routesAreCached()
*/
public function getCachedRoutesPath()
{
return $this->bootstrapPath().'/cache/routes.php';
return $_ENV['APP_ROUTES_CACHE'] ?? $this->bootstrapPath().'/cache/routes.php';
}

/**
Expand Down

0 comments on commit b402b56

Please sign in to comment.