@@ -24,11 +24,11 @@ discard block |
||
| 24 | 24 | __DIR__.'/../config/laravel-cache.php' => config_path('laravel-cache.php'), |
| 25 | 25 | ], 'config'); |
| 26 | 26 | |
| 27 | - $this->app->bind(AlternativeCacheStore::class, function () { |
|
| 27 | + $this->app->bind(AlternativeCacheStore::class, function() { |
|
| 28 | 28 | return $this->app->make(CacheManager::class)->store()->getStore(); |
| 29 | 29 | }); |
| 30 | 30 | |
| 31 | - Event::listen(['eloquent.saved: *', 'eloquent.deleted: *', 'eloquent.restored: *'], function (Model $model) { |
|
| 31 | + Event::listen(['eloquent.saved: *', 'eloquent.deleted: *', 'eloquent.restored: *'], function(Model $model) { |
|
| 32 | 32 | /** @var CacheInvalidator $cacheInvalidator */ |
| 33 | 33 | $cacheInvalidator = $this->app->make(CacheInvalidator::class); |
| 34 | 34 | $cacheInvalidator->invalidateByModel($model); |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | public function register() |
| 44 | 44 | { |
| 45 | 45 | $this->app->register(AlternativeCacheStoresServiceProvider::class); |
| 46 | - $this->app->afterResolving('cache', function () { |
|
| 46 | + $this->app->afterResolving('cache', function() { |
|
| 47 | 47 | $cacheManager = $this->app->make('cache'); |
| 48 | - $cacheManager->extend('redis', function ($app, array $cacheConfig) use ($cacheManager) { |
|
| 48 | + $cacheManager->extend('redis', function($app, array $cacheConfig) use ($cacheManager) { |
|
| 49 | 49 | $store = new AlternativeRedisCacheStore( |
| 50 | 50 | $app['redis'], |
| 51 | 51 | array_get($cacheConfig, 'prefix') ?: config('cache.prefix'), |
@@ -19,14 +19,14 @@ |
||
| 19 | 19 | // If the item exists in the cache we will just return this immediately |
| 20 | 20 | // otherwise we will execute the given Closure and cache the result |
| 21 | 21 | // of that execution for the given number of minutes in storage. |
| 22 | - if (! is_null($value = $this->get($key))) { |
|
| 22 | + if (!is_null($value = $this->get($key))) { |
|
| 23 | 23 | return $value; |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | $value = $callback(); |
| 27 | 27 | |
| 28 | 28 | if ($value instanceof Collection || $value instanceof Model) { |
| 29 | - $tags = array_merge(app(TagFinder::class)->find($value), $tags); |
|
| 29 | + $tags = array_merge(app(TagFinder::class)->find($value), $tags); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $this |