New command: SETEX (Redis v2.0-dev).

This commit is contained in:
Daniele Alessandri
2010-04-23 21:38:22 +02:00
parent 77c8b702b6
commit 2eb68a0fee
+6
View File
@@ -1457,6 +1457,8 @@ class RedisServer_vNext extends RedisServer_v1_2 {
'discard' => '\Predis\Commands\Discard',
/* commands operating on string values */
'setex' => '\Predis\Commands\SetExpire',
'setExpire' => '\Predis\Commands\SetExpire',
'append' => '\Predis\Commands\Append',
'substr' => '\Predis\Commands\Substr',
@@ -1810,6 +1812,10 @@ class Set extends \Predis\MultiBulkCommand {
public function getCommandId() { return 'SET'; }
}
class SetExpire extends \Predis\MultiBulkCommand {
public function getCommandId() { return 'SETEX'; }
}
class SetPreserve extends \Predis\MultiBulkCommand {
public function getCommandId() { return 'SETNX'; }
public function parseResponse($data) { return (bool) $data; }