mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-01-17 21:49:01 +01:00
Merge pull request #2007 from CachetHQ/revert-1976-cli
Revert "Don't use settings caching in cli"
This commit is contained in:
commit
84bedf5c60
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user