Removed config caching system for now

This commit is contained in:
Graham Campbell
2016-01-29 23:01:07 +00:00
parent 1b24cdb1c5
commit dc8b8eae78

View File

@@ -14,7 +14,6 @@ namespace CachetHQ\Cachet\Foundation\Providers;
use CachetHQ\Cachet\Config\Repository;
use CachetHQ\Cachet\Models\Setting as SettingModel;
use Exception;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\ServiceProvider;
@@ -27,20 +26,6 @@ class ConfigServiceProvider extends ServiceProvider
*/
public function boot()
{
if ($this->app->configurationIsCached()) {
if ($this->app->environment() === 'production') {
$this->app->terminating(function () {
if ($this->app->setting->stale()) {
$this->app->make(Kernel::class)->call('config:cache');
}
});
} else {
$this->app->make(Kernel::class)->call('config:clear');
}
return;
}
try {
$this->app->config->set('setting', $this->app->setting->all());
} catch (Exception $e) {
@@ -72,12 +57,6 @@ class ConfigServiceProvider extends ServiceProvider
}
$this->app->config->set('cors.paths.api/v1/*.allowedOrigins', $allowedOrigins);
if ($this->app->environment() === 'production') {
$this->app->terminating(function () {
$this->app->make(Kernel::class)->call('config:cache');
});
}
}
/**