Skip to content

Commit cee53ed

Browse files
stancllukinovec
andauthored
[10.x] Add the ability to re-resolve cache drivers (#46203)
* Make `resolve()` publlc in CacheManager * Add `setStore()` to Repository * Add `setStore()` to Repository interface * Fix docblocks * Delete `getStore()` from the Repository interface * docblock code style --------- Co-authored-by: lukinovec <[email protected]>
1 parent 0ec4459 commit cee53ed

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

src/Illuminate/Cache/CacheManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected function get($name)
9191
*
9292
* @throws \InvalidArgumentException
9393
*/
94-
protected function resolve($name)
94+
public function resolve($name)
9595
{
9696
$config = $this->getConfig($name);
9797

src/Illuminate/Cache/Repository.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,19 @@ public function getStore()
587587
return $this->store;
588588
}
589589

590+
/**
591+
* Set the cache store implementation.
592+
*
593+
* @param \Illuminate\Contracts\Cache\Store $store
594+
* @return static
595+
*/
596+
public function setStore($store)
597+
{
598+
$this->store = $store;
599+
600+
return $this;
601+
}
602+
590603
/**
591604
* Fire an event for this cache instance.
592605
*

0 commit comments

Comments
 (0)