From 689996820d16f406ef3afbd37374f1e3480ae3ab Mon Sep 17 00:00:00 2001 From: Cole Shirley Date: Tue, 4 Apr 2023 12:56:28 -0600 Subject: [PATCH] fix Cache::spy with Cache::get --- src/Illuminate/Cache/CacheManager.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/Illuminate/Cache/CacheManager.php b/src/Illuminate/Cache/CacheManager.php index d945db9678f0..8bfdd31676c7 100755 --- a/src/Illuminate/Cache/CacheManager.php +++ b/src/Illuminate/Cache/CacheManager.php @@ -58,7 +58,7 @@ public function store($name = null) { $name = $name ?: $this->getDefaultDriver(); - return $this->stores[$name] = $this->get($name); + return $this->stores[$name] ??= $this->resolve($name); } /** @@ -72,17 +72,6 @@ public function driver($driver = null) return $this->store($driver); } - /** - * Attempt to get the store from the local cache. - * - * @param string $name - * @return \Illuminate\Contracts\Cache\Repository - */ - protected function get($name) - { - return $this->stores[$name] ?? $this->resolve($name); - } - /** * Resolve the given store. *