File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 88use NinjaMutex \Lock \FlockLock ;
99use NinjaMutex \Lock \MemcachedLock ;
1010use NinjaMutex \Lock \MySqlLock ;
11- use NinjaMutex \Lock \PhpRedisLock ;
1211use NinjaMutex \Lock \PredisRedisLock ;
1312use NinjaMutex \Mutex as Ninja ;
1413
@@ -41,7 +40,7 @@ public function getStrategy()
4140 );
4241
4342 case 'redis ' :
44- return $ this ->getRedisLock (config ( ' database.redis.client ' , ' predis ' ) );
43+ return $ this ->getRedisLock ();
4544
4645 case 'memcached ' :
4746 return new MemcachedLock (Cache::getStore ()->getMemcached ());
@@ -52,20 +51,11 @@ public function getStrategy()
5251 }
5352 }
5453
55- private function getRedisLock ($ client )
54+ private function getRedisLock ()
5655 {
57- if ($ client === 'phpredis ' ) {
58- return new PhpRedisLock ($ this ->getPhpRedisClient ());
59- }
60-
6156 return new PredisRedisLock ($ this ->getPredisClient ());
6257 }
6358
64- public function getPhpRedisClient ()
65- {
66- return RedisFacade::connection ()->client ();
67- }
68-
6959 public function getPredisClient ()
7060 {
7161 return RedisFacade::connection ();
You can’t perform that action at this time.
0 commit comments