ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / Managing databases / Big Data / Managing REDIS databases
  • Properties specific to redisConnection variables
  • WLanguage functions that use the redisConnection type
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
redisConnection (Variable type)
In french: redisConnexion
The type redisConnection allows you to define all the advanced characteristics of a connection to a server (or cluster) Redis. You can define and change the characteristics of this connection using different WLanguage properties.
New in version 2025
This type of variable can also be used to define the characteristics of a connection to a Valkey server.
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
// Connexion à un serveur
gRedisSimple is redisConnection
gRedisSimple.Server = "monserveur:7001"
gRedisSimple.ConnectionTimeout = 1 s
gRedisSimple.Password = "mot de passe secret"
// Connexion à un cluster 
gRedisCluster is redisConnection
gRedisCluster.Server[1] = "RedisNode1:7001"
gRedisCluster.Server[2] = "RedisNode1:7002"
gRedisCluster.Server[3] = "RedisNode2:7001"
gRedisCluster.Server[4] = "RedisNode2:7002"
Properties

Properties specific to redisConnection variables

The following properties can be used to manipulate a connection to a Redis server or cluster:
Property nameType usedEffect
ConnectionTimeoutDuration, integerMaximum timeout for the connection expressed in milliseconds (20 seconds by default, i.e. 20000 milliseconds). This property can correspond to:
  • an integer representing the number of milliseconds,
  • a Duration variable,
  • the duration in a readable format (e.g., '20s' or '20000ms').
PasswordCharacter string or Secret stringPassword used if a connection to a Redis server requires authentication.
New in version 2025
Secret strings: If you use the secret string vault, the type of secret string used for this parameter must be "ANSI or Unicode string".
To learn more about secret strings and how to use the vault, see Secret string vault.
ServerArray of stringsArray 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"
Linux On Linux, it is possible to use the "unix:unixdomainsocket" format to use a Unix domain socket connection.
Remarks

WLanguage functions that use the redisConnection type

RedisConnectOpens a connection to a Redis server (or cluster).
RedisExecuteCommandExecutes a command on a Redis server and retrieves the result.
RedisPipelineAddAdds a Redis command in a pipeline.
RedisPipelineGetRetrieves the result of the execution of a Redis command that was added by RedisPipelineAdd.
RedisPipelineResetIgnores the results of the execution of a Redis command that was added by RedisPipelineAdd.
RedisPublishPublishes a message on a Redis broadcast channel.
RedisSubscribeSubscribes to a Redis broadcast channel.
RedisUnsubscribeCancels a subscription to a Redis broadcast channel.
See also
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/16/2025

Send a report | Local help