ソースを参照

Enable INCRBYFLOAT in cluster mode

Alexey Kupershtokh 11 年 前
コミット
f784dfad84

+ 1 - 0
lib/Predis/Cluster/PredisStrategy.php

@@ -74,6 +74,7 @@ class PredisStrategy implements StrategyInterface
             'GETSET'                => $keyIsFirstArgument,
             'INCR'                  => $keyIsFirstArgument,
             'INCRBY'                => $keyIsFirstArgument,
+            'INCRBYFLOAT'           => $keyIsFirstArgument,
             'SETBIT'                => $keyIsFirstArgument,
             'SETEX'                 => $keyIsFirstArgument,
             'MSET'                  => array($this, 'getKeyFromInterleavedArguments'),

+ 1 - 0
lib/Predis/Cluster/RedisStrategy.php

@@ -70,6 +70,7 @@ class RedisStrategy implements StrategyInterface
             'GETSET'                => $keyIsFirstArgument,
             'INCR'                  => $keyIsFirstArgument,
             'INCRBY'                => $keyIsFirstArgument,
+            'INCRBYFLOAT'           => $keyIsFirstArgument,
             'SETBIT'                => $keyIsFirstArgument,
             'SETEX'                 => $keyIsFirstArgument,
             'MSET'                  => array($this, 'getKeyFromInterleavedArguments'),

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

@@ -280,6 +280,7 @@ class PredisStrategyTest extends PredisTestCase
             'GETSET'                => 'keys-first',
             'INCR'                  => 'keys-first',
             'INCRBY'                => 'keys-first',
+            'INCRBYFLOAT'           => 'keys-first',
             'SETBIT'                => 'keys-first',
             'SETEX'                 => 'keys-first',
             'MSET'                  => 'keys-interleaved',

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

@@ -288,6 +288,7 @@ class RedisStrategyTest extends PredisTestCase
             'GETSET'                => 'keys-first',
             'INCR'                  => 'keys-first',
             'INCRBY'                => 'keys-first',
+            'INCRBYFLOAT'           => 'keys-first',
             'SETBIT'                => 'keys-first',
             'SETEX'                 => 'keys-first',
             'MSET'                  => 'keys-interleaved',

+ 1 - 0
tests/Predis/Replication/ReplicationStrategyTest.php

@@ -286,6 +286,7 @@ class ReplicationStrategyTest extends PredisTestCase
             'GETSET'                => 'write',
             'INCR'                  => 'write',
             'INCRBY'                => 'write',
+            'INCRBYFLOAT'           => 'write',
             'SETBIT'                => 'write',
             'SETEX'                 => 'write',
             'MSET'                  => 'write',