chore: initial commit

This commit is contained in:
Christy Jacob
2024-12-17 08:21:38 +05:30
parent 0c3ed7f81b
commit 396faa56c2
7 changed files with 72 additions and 78 deletions
+15
View File
@@ -1531,6 +1531,21 @@ App::setResource('cache', function (Group $pools) {
return new Cache(new Sharding($adapters));
}, ['pools']);
App::setResource('redis', function (Group $pools) {
$list = Config::getParam('pools-cache', []);
$adapters = [];
foreach ($list as $value) {
$adapters[] = $pools
->get($value)
->pop()
->getResource()
;
}
return new Sharding($adapters);
}, ['pools']);
App::setResource('deviceForLocal', function () {
return new Local();
});