Fix some bits

This commit is contained in:
James Brooks
2016-05-25 11:14:16 +01:00
parent 414efb0ce7
commit 0bf2039e60
2 changed files with 11 additions and 4 deletions

View File

@@ -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 () {

View File

@@ -11,8 +11,15 @@
namespace CachetHQ\Cachet\Settings;
use Exception;
use Illuminate\Filesystem\Filesystem;
/**
* This is the Cache class.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
class Cache
{
/**