Skip to content

Commit 7b3f50c

Browse files
committed
update
1 parent fd79d72 commit 7b3f50c

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

src/CacheFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ protected function createRedisDriver(array $config)
267267
$redisConfig = \config('redis');
268268
$client = $redisConfig['client'] ?? 'phpredis';
269269

270-
$store = new RedisStore(new RedisManager('', $client, $redisConfig), $this->getPrefix($config), $connection);
270+
$store = new RedisStore(new RedisFactory(), $this->getPrefix($config), $connection);
271271

272272
return $this->repository(
273273
$store->setLockConnection($config['lock_connection'] ?? $connection)

src/RedisFactory.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ final class RedisFactory implements Factory
1010

1111
public function connection($name = null)
1212
{
13+
if($name == null){
14+
$name = 'default';
15+
}
1316
return Redis::connection($name);
1417
}
18+
19+
/**
20+
* Pass methods onto the default Redis connection.
21+
*
22+
* @param string $method
23+
* @param array $parameters
24+
* @return mixed
25+
*/
26+
public function __call($method, $parameters)
27+
{
28+
return $this->connection()->{$method}(...$parameters);
29+
}
1530
}

0 commit comments

Comments
 (0)