소스 검색

Handle DUMP and RESTORE with Predis\Connection\PredisCluster.

Daniele Alessandri 12 년 전
부모
커밋
5b771704d3
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      lib/Predis/Cluster/PredisClusterHashStrategy.php
  2. 2 0
      tests/Predis/Cluster/PredisClusterHashStrategyTest.php

+ 2 - 0
lib/Predis/Cluster/PredisClusterHashStrategy.php

@@ -58,6 +58,8 @@ class PredisClusterHashStrategy implements CommandHashStrategyInterface
             'TTL'                   => $keyIsFirstArgument,
             'PTTL'                  => $keyIsFirstArgument,
             'SORT'                  => $keyIsFirstArgument, // TODO
+            'DUMP'                  => $keyIsFirstArgument,
+            'RESTORE'               => $keyIsFirstArgument,
 
             /* commands operating on string values */
             'APPEND'                => $keyIsFirstArgument,

+ 2 - 0
tests/Predis/Cluster/PredisClusterHashStrategyTest.php

@@ -263,6 +263,8 @@ class PredisClusterHashStrategyTest extends StandardTestCase
             'TTL'                   => 'keys-first',
             'PTTL'                  => 'keys-first',
             'SORT'                  => 'keys-first', // TODO
+            'DUMP'                  => 'keys-first',
+            'RESTORE'               => 'keys-first',
 
             /* commands operating on string values */
             'APPEND'                => 'keys-first',