Description:
Connect to a Redis database under the single machine model.
Syntax:
redis(hostAndPort,password,connectionTimeout,soTimeout)
Note:
This external library function connects to a Redis database under the single machine model.
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). |
soTimeout |
Timeout value when trying to read data(in seconds). |
Return value:
Cursor
Example:
|
A |
|
1 |
=redis("192.168.18.131:6379","runqian") |
|
2 |
=redis("192.168.18.131:6379","runqian",20,60) |
|