diff --git a/src/Command/Processor/KeyPrefixProcessor.php b/src/Command/Processor/KeyPrefixProcessor.php index 1ad0bf82..0f371820 100644 --- a/src/Command/Processor/KeyPrefixProcessor.php +++ b/src/Command/Processor/KeyPrefixProcessor.php @@ -34,7 +34,7 @@ class KeyPrefixProcessor implements ProcessorInterface $this->prefix = $prefix; $this->commands = array( /* ---------------- Redis 1.2 ---------------- */ - 'EXISTS' => 'self::first', + 'EXISTS' => 'self::all', 'DEL' => 'self::all', 'TYPE' => 'self::first', 'KEYS' => 'self::first', diff --git a/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php b/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php index 08711566..15c7dac1 100644 --- a/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php +++ b/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php @@ -864,6 +864,10 @@ class KeyPrefixProcessorTest extends PredisTestCase array('127.0.0.1', '6379', 'key', '0', '10', 'COPY', 'REPLACE'), array('127.0.0.1', '6379', 'prefix:key', '0', '10', 'COPY', 'REPLACE'), ), + array('EXISTS', + array('key1', 'key2', 'key3'), + array('prefix:key1', 'prefix:key2', 'prefix:key3'), + ), ); } }