Skip to content

Commit fd79d72

Browse files
committed
update
1 parent 26a244c commit fd79d72

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
@@ -162,7 +162,7 @@ protected function loadStore($store){
162162
$client = $config['client'] ?? 'phpredis';
163163
$redisConfig = $this->config['stores']['redis'];
164164
$connection = $redisConfig['connection'] ?? 'default';
165-
$reStore = new RedisStore(new RedisManager('', $client, $config),$prefix,$connection);
165+
$reStore = new RedisStore(new RedisFactory(),$prefix,$connection);
166166
$reStore->setLockConnection($redisConfig['lock_connection'] ?? $connection);
167167
}elseif($store ==='memcached'){
168168
$config = $this->config['stores']['memcached'];

src/RedisFactory.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
3+
namespace Shopwwi\LaravelCache;
4+
5+
use Illuminate\Contracts\Redis\Factory;
6+
use support\Redis;
7+
8+
final class RedisFactory implements Factory
9+
{
10+
11+
public function connection($name = null)
12+
{
13+
return Redis::connection($name);
14+
}
15+
}

0 commit comments

Comments
 (0)