Browse Source

Fix cluster strategy to handle variadic EXISTS (Redis >= 3.0.3).

Daniele Alessandri 10 years ago
parent
commit
c436e01353

+ 1 - 1
src/Cluster/ClusterStrategy.php

@@ -44,7 +44,7 @@ abstract class ClusterStrategy implements StrategyInterface
 
         return array(
             /* commands operating on the key space */
-            'EXISTS' => $getKeyFromFirstArgument,
+            'EXISTS' => $getKeyFromAllArguments,
             'DEL' => $getKeyFromAllArguments,
             'TYPE' => $getKeyFromFirstArgument,
             'EXPIRE' => $getKeyFromFirstArgument,

+ 1 - 1
tests/Predis/Cluster/PredisStrategyTest.php

@@ -255,7 +255,7 @@ class PredisStrategyTest extends PredisTestCase
     {
         $commands = array(
             /* commands operating on the key space */
-            'EXISTS' => 'keys-first',
+            'EXISTS' => 'keys-all',
             'DEL' => 'keys-all',
             'TYPE' => 'keys-first',
             'EXPIRE' => 'keys-first',

+ 1 - 1
tests/Predis/Cluster/RedisStrategyTest.php

@@ -265,7 +265,7 @@ class RedisStrategyTest extends PredisTestCase
     {
         $commands = array(
             /* commands operating on the key space */
-            'EXISTS' => 'keys-first',
+            'EXISTS' => 'keys-all',
             'DEL' => 'keys-all',
             'TYPE' => 'keys-first',
             'EXPIRE' => 'keys-first',