diff --git a/app/Foundation/Providers/ConfigServiceProvider.php b/app/Foundation/Providers/ConfigServiceProvider.php index d9d49331..7db50865 100644 --- a/app/Foundation/Providers/ConfigServiceProvider.php +++ b/app/Foundation/Providers/ConfigServiceProvider.php @@ -34,9 +34,9 @@ class ConfigServiceProvider extends ServiceProvider public function boot() { $env = $this->app->environment(); - $repo = $app->make(Repository::class); - $cache = $app->make(Cache::class); - $loaded = $cache->load(); + $repo = $this->app->make(Repository::class); + $cache = $this->app->make(Cache::class); + $loaded = $cache->load($env); $this->app->terminating(function () use ($env, $repo, $cache, $loaded) { if ($repo->stale() || $loaded === false) { @@ -94,7 +94,7 @@ class ConfigServiceProvider extends ServiceProvider public function register() { $this->app->singleton(Cache::class, function ($app) { - return new Cache($app->filesystem, $app->bootstrapPath().'/cachet'); + return new Cache($app->files, $app->bootstrapPath().'/cachet'); }); $this->app->singleton(Repository::class, function () { diff --git a/app/Settings/Cache.php b/app/Settings/Cache.php index ba772659..51f69807 100644 --- a/app/Settings/Cache.php +++ b/app/Settings/Cache.php @@ -11,8 +11,15 @@ namespace CachetHQ\Cachet\Settings; +use Exception; use Illuminate\Filesystem\Filesystem; +/** + * This is the Cache class. + * + * @author Graham Campbell + * @author James Brooks + */ class Cache { /**