Skip to content

Commit 7fd7afa

Browse files
committed
ICM: memcached strategy implemented.
1 parent 8434171 commit 7fd7afa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Mutex.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
namespace Illuminated\Console;
44

5+
use Cache;
56
use Illuminate\Console\Command;
67
use NinjaMutex\Lock\FlockLock;
8+
use NinjaMutex\Lock\MemcachedLock;
79
use NinjaMutex\Lock\MySqlLock;
810
use NinjaMutex\Lock\PredisRedisLock;
911
use NinjaMutex\Mutex as Ninja;
10-
use NinjaMutex\MutexException;
1112
use Redis;
1213

1314
class Mutex
@@ -37,7 +38,7 @@ private function strategy()
3738
return new PredisRedisLock(Redis::connection());
3839

3940
case 'memcached':
40-
throw new MutexException('Strategy `memcached` is not implemented yet.');
41+
return new MemcachedLock(Cache::getStore()->getMemcached());
4142

4243
case 'file':
4344
default:

0 commit comments

Comments
 (0)