|
|
|
|
- Properties specific to redisConnection variables
- WLanguage functions that use the redisConnection type
redisConnection (Type of variable) In french: redisConnexion
The type redisConnection makes it possible to define all the advanced characteristics of a connection to a Redis server (or cluster). The characteristics of this connection can be defined and changed using different WLanguage properties. Remark: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
// Connection to a server gRedisSimple is redisConnection gRedisSimple.Server = "myserveur:7001" gRedisSimple.ConnectionTimeout = 1s gRedisSimple.Password = "secret password"
// Connection to a cluster gRedisCluster is redisConnexion gRedisCluster.Server[1] = "RedisNode1:7001" gRedisCluster.Server[2] = "RedisNode1:7002" gRedisCluster.Server[3] = "RedisNode2:7001" gRedisCluster.Server[4] = "RedisNode2:7002"
Remarks Properties specific to redisConnection variables The following properties can be used to handle a connection to a Redis server or cluster: | | | Property name | Type used | Effect |
---|
ConnectionTimeout | Duration, integer | Maximum timeout for the connection expressed in milliseconds (20 seconds by default, which means 20000 milliseconds). This property can correspond to: - an integer corresponding to the number of milliseconds,
- a Duration variable,
- the duration in a readable format (e.g., '20s' ou '20000ms').
| Password | Character string | Password used if a the connection to a Redis server requires authentication. | Server | Array of strings | Array of Redis servers. Ability to specify multiple Redis servers. In the case of a Redis cluster, it will be possible to connect even if a node of the Redis cluster is inaccessible. The format of the server name must be "ip:port or dnsname:port" |
WLanguage functions that use the redisConnection type
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|