Description:
Connect to a Redis database in shared pool mode.
Syntax:
redis_shared(hostAndPort:password[,hostAndPort1:password1,…][:connectionTimeout:soTimeout;pattern])
Note:
This external library function connects to a Redis database in shared pool mode.
Parameters:
hostAndPort |
The Redis database’s IP and port number, which is a string in the format of ip:port. |
password |
The Redis database’s authentication password. |
connectionTimeout |
Timeout value when trying to connect to the database (in seconds); can be omitted. |
soTimeout |
Timeout value when trying to read data(in seconds). |
pattern |
Key pattern by which the user-defined sharding algorithm is implemented; can be omitted. |
Return value:
Cursor
Example:
|
A |
1 |
=redis_shared("192.168.0.76:6379":"test1234","192.168.0.76:6380":"test1234":1000:10;idel:true,master:100) |