mirror of
https://github.com/predis/predis.git
synced 2026-08-30 20:21:31 +00:00
New commands: WATCH and UNWATCH (Redis v2.2-dev).
This commit is contained in:
@@ -1658,6 +1658,13 @@ class RedisServer_v2_0 extends RedisServer_v1_2 {
|
||||
|
||||
class RedisServer_vNext extends RedisServer_v2_0 {
|
||||
public function getVersion() { return '2.1'; }
|
||||
public function getSupportedCommands() {
|
||||
return array_merge(parent::getSupportedCommands(), array(
|
||||
/* transactions */
|
||||
'watch' => '\Predis\Commands\Watch',
|
||||
'unwatch' => '\Predis\Commands\Unwatch',
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@@ -2648,6 +2655,16 @@ class Publish extends \Predis\MultiBulkCommand {
|
||||
public function getCommandId() { return 'PUBLISH'; }
|
||||
}
|
||||
|
||||
class Watch extends \Predis\MultiBulkCommand {
|
||||
public function canBeHashed() { return false; }
|
||||
public function getCommandId() { return 'WATCH'; }
|
||||
}
|
||||
|
||||
class Unwatch extends \Predis\MultiBulkCommand {
|
||||
public function canBeHashed() { return false; }
|
||||
public function getCommandId() { return 'UNWATCH'; }
|
||||
}
|
||||
|
||||
/* persistence control commands */
|
||||
class Save extends \Predis\MultiBulkCommand {
|
||||
public function canBeHashed() { return false; }
|
||||
|
||||
Reference in New Issue
Block a user