Skip to content

Commit

Permalink
[10.x] Add the ability to re-resolve cache drivers (#46203)
Browse files Browse the repository at this point in the history
* 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 <lukinovec@gmail.com>
  • Loading branch information
stancl and lukinovec committed Feb 21, 2023
1 parent 0ec4459 commit cee53ed
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Cache/CacheManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected function get($name)
*
* @throws \InvalidArgumentException
*/
protected function resolve($name)
public function resolve($name)
{
$config = $this->getConfig($name);

Expand Down
13 changes: 13 additions & 0 deletions src/Illuminate/Cache/Repository.php
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,19 @@ public function getStore()
return $this->store;
}

/**
* Set the cache store implementation.
*
* @param \Illuminate\Contracts\Cache\Store $store
* @return static
*/
public function setStore($store)
{
$this->store = $store;

return $this;
}

/**
* Fire an event for this cache instance.
*
Expand Down

0 comments on commit cee53ed

Please sign in to comment.