Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael-grunder <michael.grunder@gmail.com>2019-01-28 20:29:13 +0300
committermichael-grunder <michael.grunder@gmail.com>2019-02-12 06:57:31 +0300
commitaba65bc2ad3bbe2c1381d90a0fb8c8803c70ace1 (patch)
tree6a43483c31444b4ef1cc0c8a0f26a4ed9c359b83
parent0f4f6e31529c102151bc8bc49882e1a6d6239ac4 (diff)
Add a note that scan is a directed node command.
-rw-r--r--README.markdown2
-rw-r--r--cluster.markdown8
2 files changed, 7 insertions, 3 deletions
diff --git a/README.markdown b/README.markdown
index 750fc2d9..0fa27ecf 100644
--- a/README.markdown
+++ b/README.markdown
@@ -1043,6 +1043,8 @@ _**Description**_: Scan the keyspace for keys
##### *Return value*
*Array, boolean*: This function will return an array of keys or FALSE if Redis returned zero keys
+*Note*: SCAN is a "directed node" command in [RedisCluster](cluster.markdown#directed_node_commands).
+
##### *Example*
~~~php
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.