Revert "Don't use settings caching in cli"

This commit is contained in:
Graham Campbell
2016-07-25 19:25:05 +01:00
committed by GitHub
parent acd1ac496d
commit 309a3f96ef

View File

@@ -35,10 +35,9 @@ class ConfigServiceProvider extends ServiceProvider
public function boot()
{
$env = $this->app->environment();
$cli = $this->app->runningInConsole();
$repo = $this->app->make(Repository::class);
$cache = $this->app->make(Cache::class);
$loaded = $cli ? false : $cache->load($env);
$loaded = $cache->load($env);
$this->app->terminating(function () use ($repo, $cache) {
if ($repo->stale()) {
@@ -47,7 +46,7 @@ class ConfigServiceProvider extends ServiceProvider
});
try {
if ($cli === false && $loaded === false) {
if ($loaded === false) {
$loaded = $repo->all();
$cache->store($env, $loaded);
}