We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
scopedIf
CacheManager::memo()
1 parent cfaf36a commit 6a97fe0Copy full SHA for 6a97fe0
src/Illuminate/Cache/CacheManager.php
@@ -81,11 +81,9 @@ public function memo($driver = null)
81
{
82
$driver = $driver ?: $this->getDefaultDriver();
83
84
- if (! $this->app->bound($bindingKey = "cache.__memoized:{$driver}")) {
85
- $this->app->scoped($bindingKey, fn () => $this->repository(
86
- new MemoizedStore($driver, $this->store($driver)), ['events' => false]
87
- ));
88
- }
+ $this->app->scopedIf($bindingKey = "cache.__memoized:{$driver}", fn () => $this->repository(
+ new MemoizedStore($driver, $this->store($driver)), ['events' => false]
+ ));
89
90
return $this->app->make($bindingKey);
91
}
0 commit comments