@@ -108,7 +108,7 @@ So be patient on to many open FD's (specially on redis server side) when using p
108
108
connections on many servers connecting to one redis server.
109
109
110
110
Also more than one persistent connection can be made identified by either host + port + timeout
111
- or unix socket + timeout.
111
+ or host + persistent_id or unix socket + timeout.
112
112
113
113
This feature is not available in threaded versions. ` pconnect ` and ` popen ` then working like their non
114
114
persistent equivalents.
@@ -118,6 +118,7 @@ persistent equivalents.
118
118
* host* : string. can be a host, or the path to a unix domain socket
119
119
* port* : int, optional
120
120
* timeout* : float, value in seconds (optional, default is 0 meaning unlimited)
121
+ * persistent_id* : string. identity for the requested persistent connection
121
122
122
123
##### * Return Value*
123
124
@@ -128,8 +129,9 @@ persistent equivalents.
128
129
<pre >
129
130
$redis->pconnect('127.0.0.1', 6379);
130
131
$redis->pconnect('127.0.0.1'); // port 6379 by default - same connection like before.
131
- $redis->pconnect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout and would be another connection then the two before.
132
- $redis->pconnect('/tmp/redis.sock'); // unix domain socket - would be another connection then the three before.
132
+ $redis->pconnect('127.0.0.1', 6379, 2.5); // 2.5 sec timeout and would be another connection than the two before.
133
+ $redis->pconnect('127.0.0.1', 6379, 2.5, 'x'); // x is sent as persistent_id and would be another connection the the three before.
134
+ $redis->pconnect('/tmp/redis.sock'); // unix domain socket - would be another connection than the four before.
133
135
</pre >
134
136
135
137
## close
0 commit comments