Skip to content

Commit 4307b85

Browse files
authored
fix Cache::spy with Cache::get (#46689)
1 parent fca8835 commit 4307b85

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/Illuminate/Cache/CacheManager.php

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function store($name = null)
5858
{
5959
$name = $name ?: $this->getDefaultDriver();
6060

61-
return $this->stores[$name] = $this->get($name);
61+
return $this->stores[$name] ??= $this->resolve($name);
6262
}
6363

6464
/**
@@ -72,17 +72,6 @@ public function driver($driver = null)
7272
return $this->store($driver);
7373
}
7474

75-
/**
76-
* Attempt to get the store from the local cache.
77-
*
78-
* @param string $name
79-
* @return \Illuminate\Contracts\Cache\Repository
80-
*/
81-
protected function get($name)
82-
{
83-
return $this->stores[$name] ?? $this->resolve($name);
84-
}
85-
8675
/**
8776
* Resolve the given store.
8877
*

0 commit comments

Comments
 (0)