diff options
author | amolrajoba <amolrajoba@gmail.com> | 2014-09-15 19:26:17 +0400 |
---|---|---|
committer | amolrajoba <amolrajoba@gmail.com> | 2014-09-15 19:26:17 +0400 |
commit | 9ec0c93fb4d9232d1453df5ea23495067e56c256 (patch) | |
tree | f2fae8c6db29de552583a450078b311a78a47b4d /arrays.markdown | |
parent | 4c1f1bcaa2d1d85d4815ebc4d1026a40071d52c6 (diff) |
Update arrays.markdown
Documentation with example for great addition of connetion timeout 'connect_timeout'
Diffstat (limited to 'arrays.markdown')
-rw-r--r-- | arrays.markdown | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arrays.markdown b/arrays.markdown index b1220891..efc3f05d 100644 --- a/arrays.markdown +++ b/arrays.markdown @@ -40,13 +40,19 @@ $ra = new RedisArray(array("host1", "host2", "host3"), array("previous" => array #### Specifying the "retry_interval" parameter The retry_interval is used to specify a delay in milliseconds between reconnection attempts in case the client loses connection with a server <pre> -$ra = new RedisArray(array("host1", "host2:63792", "host2:6380"), array("retry_timeout" => 100))); +$ra = new RedisArray(array("host1", "host2:63792", "host2:6380"), array("retry_timeout" => 100)); </pre> #### Specifying the "lazy_connect" parameter This option is useful when a cluster has many shards but not of them are necessarily used at one time. <pre> -$ra = new RedisArray(array("host1", "host2:63792", "host2:6380"), array("lazy_connect" => true))); +$ra = new RedisArray(array("host1", "host2:63792", "host2:6380"), array("lazy_connect" => true)); +</pre> + +#### Specifying the "connect_timeout" parameter +The connect_timeout value is a double and is used to specify a timeout in number of seconds when creating redis socket connections used in the RedisArray. +<pre> +$ra = new RedisArray(array("host1", "host2:63792", "host2:6380"), array("connect_timeout" => 0.5)); </pre> #### Defining arrays in Redis.ini |