diff options
author | michael-grunder <michael.grunder@gmail.com> | 2019-01-28 20:29:13 +0300 |
---|---|---|
committer | michael-grunder <michael.grunder@gmail.com> | 2019-02-12 06:57:31 +0300 |
commit | aba65bc2ad3bbe2c1381d90a0fb8c8803c70ace1 (patch) | |
tree | 6a43483c31444b4ef1cc0c8a0f26a4ed9c359b83 /cluster.markdown | |
parent | 0f4f6e31529c102151bc8bc49882e1a6d6239ac4 (diff) |
Add a note that scan is a directed node command.
Diffstat (limited to 'cluster.markdown')
-rw-r--r-- | cluster.markdown | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cluster.markdown b/cluster.markdown index 3260bb79..96cb1370 100644 --- a/cluster.markdown +++ b/cluster.markdown @@ -130,15 +130,16 @@ This operation can also be done in MULTI mode transparently. ## Directed node commands There are a variety of commands which have to be directed at a specific node. In the case of these commands, the caller can either pass a key (which will be hashed and used to direct our command), or an array with host:port. -<pre> +~~~php // This will be directed at the slot/node which would store "mykey" $obj_cluster->echo("mykey","Hello World!"); // Here we're iterating all of our known masters, and delivering the command there foreach ($obj_cluster->_masters() as $arr_master) { - $obj_cluster->echo($arr_master, "Hello: " . implode(':', $arr_master)); + $obj_cluster->echo($arr_master, "Hello: " . implode(':', $arr_master)); } -</pre> + +~~~ In the case of all commands which need to be directed at a node, the calling convention is identical to the Redis call, except that they require an additional (first) argument in order to deliver the command. Following is a list of each of these commands: @@ -157,6 +158,7 @@ In the case of all commands which need to be directed at a node, the calling con 13. SLOWLOG 14. RANDOMKEY 15. PING +16. SCAN ## Session Handler You can use the cluster functionality of phpredis to store PHP session information in a Redis cluster as you can with a non cluster-enabled Redis instance. |