Redis Connector Reference¶
To use the Redis connector, add the
redis.init - Standalone mode
The redis.init operation initializes the connector to interact with Redis.
| Parameter Name | Description | Required |
|---|---|---|
| redisHost | The Redis host name (default localhost). | Yes |
| redisPort | The port on which the Redis server is running (the default port is 6379). | Yes |
| redisTimeout | The server TTL (Time to Live) in milliseconds. | Optional. The default is 2000ms. |
| redisConnectionTimeout | The connection TTL (Time to live) in milliseconds. | Optional. The default equals to the redisTimeout. |
Sample configuration
<redis.init>
<redisHost>{$ctx:redisHost}</redisHost>
<redisPort>{$ctx:redisPort}</redisPort>
<redisTimeout>{$ctx:redisTimeout}</redisTimeout>
<redisConnectionTimeout>{$ctx:redisConnectionTimeout}</redisConnectionTimeout>
</redis.init>
If you are connecting using a cache key, use the following init configuration.
| Parameter Name | Description | Required |
|---|---|---|
| cacheKey | Key of the cache (password). | Optional |
| useSsl | A flag to switch between SSL and non-SSL. | Optional. Default is false. |
Sample configuration
<redis.init>
<redisHost>{$ctx:redisHost}</redisHost>
<redisPort>{$ctx:redisPort}</redisPort>
<redisTimeout>{$ctx:redisTimeout}</redisTimeout>
<redisConnectionTimeout>{$ctx:redisConnectionTimeout}</redisConnectionTimeout>
<cacheKey>{$ctx:cacheKey}</cacheKey>
<useSsl>{$ctx:useSsl}</useSsl>
</redis.init>
redis.init - Cluster mode
The redis.init operation initializes the connector to interact with Redis cluster.
| Parameter Name | Description | Required |
|---|---|---|
| redisClusterEnabled | A flag to enable the redis cluster mode (Default is false). | Yes |
| clusterNodes | Comma separated list of the cluster nodes as Node1_hostname:Port,Node2_hostname:Port, etc. Example: 127.0.0.1:40001,127.0.0.1:40002 | Yes |
| redisTimeout | The server TTL (Time to Live) in milliseconds. | Optional. The default is 2000ms. |
| redisConnectionTimeout | The connection TTL (Time to live) in milliseconds. | Optional. The default equals to the redisTimeout. |
| maxAttempts | The number of retries. | Optional. The default is 5. |
| clientName | Name of the client. | Optional. Default is empty |
| cacheKey | Key of the cache (password). | Optional. |
| useSsl | A flag to switch between SSL and non-SSL. | Optional. Default is false. |
Sample configuration
<redis.init>
<redisHost>{$ctx:redisHost}</redisHost>
<redisPort>{$ctx:redisPort}</redisPort>
<redisTimeout>{$ctx:redisTimeout}</redisTimeout>
<redisConnectionTimeout>{$ctx:redisConnectionTimeout}</redisConnectionTimeout>
<maxAttempts>5</maxAttempts>
<clientName>WSO2EI</clientName>
</redis.init>
If you are connecting using a cache key, use the following init configuration.
Sample configuration
<redis.init>
<redisHost>{$ctx:redisHost}</redisHost>
<redisPort>{$ctx:redisPort}</redisPort>
<redisTimeout>{$ctx:redisTimeout}</redisTimeout>
<redisConnectionTimeout>{$ctx:redisConnectionTimeout}</redisConnectionTimeout>
<maxAttempts>5</maxAttempts>
<clientName>WSO2EI</clientName>
<cacheKey>{$ctx:cacheKey}</cacheKey>
<useSsl>{$ctx:useSsl}</useSsl>
</redis.init>
Connection Commands¶
echo
The echo operation returns a specified string. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisMessage | The message that you want to echo. | Yes |
Sample configuration
Sample request
ping
The ping operation pings the server to verify whether the connection is still alive. See the related documentation for more information.
Sample configuration
Sample request
An empty request can be handled by the ping operation.
quit
The quit operation closes the connection to the server. See the related documentation for more information.
Sample configuration
Sample request
An empty request can be handled by the quit operation.
Hashes¶
hDel
The hDel operation deletes one or more specified hash fields. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
| redisFields | The fields that you want to delete. | Yes |
Sample configuration
<redis.hDel>
<redisKey>{$ctx:redisKey}</redisKey>
<redisFields>{$ctx:redisFields}</redisFields>
</redis.hDel>
Sample request
hExists
The hExists operation determines whether a specified hash field exists. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
| redisFields | The fields that determine existence. | Yes |
Sample configuration
<redis.hExists>
<redisKey>{$ctx:redisKey}</redisKey>
<redisFields>{$ctx:redisFields}</redisFields>
</redis.hExists>
Sample request
hGet
The hGet operation retrieves the value of a particular field in a hash stored in a specified key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
| redisFields | The field for which you want to retrieve the value. | Yes |
Sample configuration
<redis.hGet>
<redisKey>{$ctx:redisKey}</redisKey>
<redisFields>{$ctx:redisFields}</redisFields>
</redis.hGet>
Sample request
hGetAll
The hGetAll operation retrieves all the fields and values of a hash stored in a specified key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
Sample configuration
Sample request
hIncrBy
The hIncrBy operation increments the integer value of a hash field by the specified amount. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
| redisFields | The hash field for which you want to increment the value. | Yes |
| redisValue | The amount by which you want to increment the hash field value. | Yes |
Sample configuration
<redis.hIncrBy>
<redisKey>{$ctx:redisKey}</redisKey>
<redisField>{$ctx:redisField}</redisField>
<redisValue>{$ctx:redisValue}</redisValue>
</redis.hIncrBy>
Sample request
hKeys
The hKeys operation retrieves all the fields in a hash. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
Sample configuration
Sample request
hLen
The hLen operation retrieves the number of fields in a hash. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
Sample configuration
Sample request
hMGet
The hMGet operation retrieves values associated with each of the specified fields in a hash that is stored in a particular key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
| redisFields | The hash field for which you want to retrieve values. | Yes |
Sample configuration
<redis.hMGet>
<redisKey>{$ctx:redisKey}</redisKey>
<redisFields>{$ctx:redisFields}</redisFields>
</redis.hMGet>
Sample request
hMSet
The hMSet operation sets specified fields to their respective values in the hash stored in a particular key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
| redisFieldsValues | The fields you want to set and their respective values. | Yes |
Sample configuration
<redis.hMSet>
<redisKey>{$ctx:redisKey}</redisKey>
<redisFieldsValues>{$ctx:redisFieldsValues}</redisFieldsValues>
</redis.hMSet>
Sample request
hSet
The hSet operation sets a specific field in a hash to a specified value. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
| redisFields | The field for which you want to set a value. | Yes |
| redisValue | The amount by which you want to increment the hash field value. | Yes |
Sample configuration
<redis.hSet>
<redisKey>{$ctx:redisKey}</redisKey>
<redisField>{$ctx:redisField}</redisField>
<redisValue>{$ctx:redisValue}</redisValue>
</redis.hSet>
Sample request
hSetnX
The hSetnX operation sets a specified field to a value, only if the field does not already exist in the hash. If field already exists, this operation has no effect. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
| redisFields | The field for which you want to set a value. | Yes |
| redisValue | The amount by which you want to increment the hash field value. | Yes |
Sample configuration
<redis.hSetnX>
<redisKey>{$ctx:redisKey}</redisKey>
<redisField>{$ctx:redisField}</redisField>
<redisValue>{$ctx:redisValue}</redisValue>
</redis.hSetnX>
Sample request
hVals
The hVals operation retrieves all values in a hash that is stored in a particular key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the hash is stored. | Yes |
Sample configuration
Sample request
Keys¶
del
The del operation deletes a specified key if it exists. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key that you want to delete. | Yes |
Sample configuration
Sample request
exists
The exists operation determines whether a specified key exists. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key that you want to determine existence. | Yes |
Sample configuration
Sample request
expire
The expire operation sets a TTL(Time to live) for a key so that the key will automatically delete once it reaches the TTL. The TTL should be specified in seconds. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key that you want to specify a TTL. | Yes |
| redisSeconds | The number of seconds representing the TTL that you want to set for the key. | Yes |
Sample configuration
<redis.expire>
<redisKey>{$ctx:redisKey}</redisKey>
<redisSeconds>{$ctx:redisSeconds}</redisSeconds>
</redis.expire>
Sample request
expireAt
The expireAt operation sets the time after which an existing key should expire. Here the time should be specified as a UNIX timestamp. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key that you want to set an expiration. | Yes |
| redisUnixTime | The time to expire specified in the UNIX timestamp format. | Yes |
Sample configuration
<redis.expire>
<redisKey>{$ctx:redisKey}</redisKey>
<redisUnixTime>{$ctx:redisUnixTime}</redisUnixTime>
</redis.expire>
Sample request
keys
The keys operation retrieves all keys that match a specified pattern. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisPattern | The pattern that you want to match when retrieving keys. | Yes |
Sample configuration
Sample request
randomKey
A sample request with an empty body can be handled by the randomKey operation. See the related documentation for more information.
Sample configuration
Sample request
rename
The rename operation renames an existing key to a new name that is specified. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisOldKey | The name of an existing key that you want to rename. | Yes |
| redisNewKey | The new name that you want the key to have. | Yes |
Sample configuration
<redis.rename>
<redisOldKey>{$ctx:redisOldKey}</redisOldKey>
<redisNewKey>{$ctx:redisNewKey}</redisNewKey>
</redis.rename>
Sample request
renamenX
The renamenX operation renames a key to a new key, only if the new key does not already exist. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisOldKey | The name of an existing key that you want to rename. | Yes |
| redisNewKey | The new name that you want the key to have. | Yes |
Sample configuration
<redis.renamenX>
<redisOldKey>{$ctx:redisOldKey}</redisOldKey>
<redisNewKey>{$ctx:redisNewKey}</redisNewKey>
</redis.renamenX>
Sample request
ttl
The ttl operation retrieves the TTL (Time to Live) value of a specified key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key for which you want to retrieve the TTL. | Yes |
Sample configuration
Sample request
type
The type operation retrieves the data type of a value stored in a specified key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key that the value is stored. | Yes |
Sample configuration
Sample request
Lists¶
blPop
The blPop operation retrieves the first element in a list, if available, or blocks the connection for a specified amount of time until an element is available. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
| redisBrPopTimeout | The amount of time to keep the connection blocked, waiting for an element to be available in the tail of the list. | Yes |
Sample configuration
<redis.brPop>
<redisKey>{$ctx:redisKey}</redisKey>
<redisBrPopTimeout>{$ctx:redisBrPopTimeout}</redisBrPopTimeout>
</redis.brPop>
Sample request
brPop
The brPop operation retrieves the last element in a list, if available, or blocks the connection for a specified amount of time until an element is available. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
| redisBlPopTimeout | The amount of time to keep the connection blocked, waiting for an element to be available in the head of the list. | Yes |
Sample configuration
<redis.blPop>
<redisKey>{$ctx:redisKey}</redisKey>
<redisBlPopTimeout>{$ctx:redisBlPopTimeout}</redisBlPopTimeout>
</redis.blPop>
Sample request
lInsert
The lInsert operation inserts a specified element before or after an existing element in a list that is stored in a specified key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
| redisWhere | The place where you want to add an element. Possible values are BEFORE or AFTER. For example, whether you want to add an element before a particular element that exists in the list. | Yes |
| redisPivot | An existing element in the list that is used as the pivot element. | Yes |
| redisValue | The element that you want to insert to the list. | Yes |
Sample configuration
<redis.lInsert>
<redisKey>{$ctx:redisKey}</redisKey>
<redisWhere>{$ctx:redisWhere}</redisWhere>
<redisPivot>{$ctx:redisPivot}</redisPivot>
<redisValue>{$ctx:redisValue}</redisValue>
</redis.lInsert>
Sample request
lLen
The lLen operation retrieves the length of a list that is stored in a specified key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
Sample configuration
Sample request
lPop
The lPop operation retrieves the first element in a list that is stored in a specified key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
Sample configuration
Sample request
lPush
The lPush operation inserts one or more elements to the head of a list that is stored in a specified key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
| redisStrings | One or more elements that you want to add to the head of the list. | Yes |
Sample configuration
<redis.lPush>
<redisKey>{$ctx:redisKey}</redisKey>
<redisStrings>{$ctx:redisStrings}</redisStrings>
</redis.lPush>
Sample request
lPushX
The lPushX operation inserts one or more elements to the head of a list stored in a specified key, only if the key already exists and holds a list. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
| redisStrings | One or more elements that you want to add to the head of the list. | Yes |
Sample configuration
<redis.lPushX>
<redisKey>{$ctx:redisKey}</redisKey>
<redisStrings>{$ctx:redisStrings}</redisStrings>
</redis.lPushX>
Sample request
lRange
The lRange operation retrieves a range of elements from a list. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
| redisStart | The starting index. | Yes |
| redisEnd | The ending index. | Yes |
Sample configuration
<redis.lRange>
<redisKey>{$ctx:redisKey}</redisKey>
<redisStart>{$ctx:redisStart}</redisStart>
<redisEnd>{$ctx:redisEnd}</redisEnd>
</redis.lRange>
Sample request
lRem
The lRem operation removes elements from a list. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
| redisCount | The number of occurrences of the element that you want to remove. | Yes |
| redisValue | The element that you want to remove. | Yes |
Sample configuration
<redis.lRem>
<redisKey>{$ctx:redisKey}</redisKey>
<redisCount>{$ctx:redisCount}</redisCount>
<redisValue>{$ctx:redisValue}</redisValue>
</redis.lRem>
Sample request
lSet
The lSet operation sets the value of an element in a list by its index. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
| redisIndex | The starting index. | Yes |
| redisValue | The value of the key | Yes |
Sample configuration
<redis.lSet>
<redisKey>{$ctx:redisKey}</redisKey>
<redisIndex>{$ctx:redisIndex}</redisIndex>
<redisValue>{$ctx:redisValue}</redisValue>
</redis.lSet>
Sample request
lTrim
The lTrim operation trims a list to a specified range. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
| redisStart | The starting index. | Yes |
| redisEnd | The ending index. | Yes |
Sample configuration
<redis.lTrim>
<redisKey>{$ctx:redisKey}</redisKey>
<redisStart>{$ctx:redisStart}</redisStart>
<redisEnd>{$ctx:redisEnd}</redisEnd>
</redis.lTrim>
Sample request
rPopLPush
The rPopLPush operation removes the last element in a list, then inserts it to another list, and then returns it. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisSrckey | The name of the source key from where the last element is retrieved. | Yes |
| redisDstkey | The name of destination key. | Yes |
Sample configuration
<redis.rPopLPush>
<redisSrckey>{$ctx:redisSrckey}</redisSrckey>
<redisDstkey>{$ctx:redisDstkey}</redisDstkey>
</redis.rPopLPush>
Sample request
rPush
The rPush operation inserts one or more elements to the tail of a list that is stored in a specified key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
| redisStrings | One or more elements that you want to add to the tail of the list. | Yes |
Sample configuration
<redis.rPush>
<redisKey>{$ctx:redisKey}</redisKey>
<redisStrings>{$ctx:redisStrings}</redisStrings>
</redis.rPush>
Sample request
rPushX
The rPushX operation inserts one or more elements to the tail of a list stored in a specified key, only if the key already exists and holds a list. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key where the list is stored. | Yes |
| redisValue | One or more elements that you want to add to the tail of the list. | Yes |
Sample configuration
<redis.rPushX>
<redisKey>{$ctx:redisKey}</redisKey>
<redisValue>{$ctx:redisValue}</redisValue>
</redis.rPushX>
Sample request
Server Commands¶
flushAll
The flushAll operation deletes all the keys from all existing databases. See the related documentation for more information.
Sample configuration
Sample request
A sample request with an empty body can be handled by the flushAll operation.
flushDB
The flushDB operation deletes all the keys from the currently selected database. See the related documentation for more information.
Sample configuration
Sample request
A sample request with an empty body can be handled by the flushDB operation.
Sets¶
sadd
The sadd operation is used to add one or more members to a set. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
| redisMembers | The value to be added to the key. | Yes |
Sample configuration
<redis.sadd>
<redisKey>{$ctx:redisKey}</redisKey>
<redisMembers>{$ctx:redisMembers}</redisMembers>
</redis.sadd>
Sample request
sDiffStore
The sDiffStore operation is used to subtract multiple sets and store the resulting set in a key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
| redisDstkey | The name of the destination key. | Yes |
Sample configuration
<redis.sDiffStore>
<redisKey>{$ctx:redisKey}</redisKey>
<redisDstkey>{$ctx:redisDstkey}</redisDstkey>
</redis.sDiffStore>
Sample request
sInter
The sInter operation is used to intersect multiple sets. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
Sample configuration
Sample request
sInterStore
The sInterStore operation is used to intersect multiple sets and store the resulting set in a key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
| redisDstkey | The name of the destination key. | Yes |
Sample configuration
<redis.sDiffStore>
<redisKey>{$ctx:redisKey}</redisKey>
<redisDstkey>{$ctx:redisDstkey}</redisDstkey>
</redis.sDiffStore>
Sample request
sIsMember
The sIsMember operation is used to determine if a given value is a member of a set. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
| redisMembers | The name of a member in a key. | Yes |
Sample configuration
<redis.sIsMember>
<redisKey>{$ctx:redisKey}</redisKey>
<redisMembers>{$ctx:redisMembers}</redisMembers>
</redis.sIsMember>
Sample request
sMembers
The sMembers operation is used to get the all members in a set. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
Sample configuration
Sample request
sMove
The sMove operation is used to move a member from one set to another. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisSrckey | The name of the source key. | Yes |
| redisDstkey | The name of the destination key. | Yes |
| redisMember | The name of the member. | Yes |
Sample configuration
<redis.sMove>
<redisSrckey>{$ctx:redisSrckey}</redisSrckey>
<redisDstkey>{$ctx:redisDstkey}</redisDstkey>
<redisMember>{$ctx:redisMember}</redisMember>
</redis.sMove>
Sample request
sPop
The sPop operation is used to remove and return one or multiple random members from a set. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
Sample configuration
Sample request
sRandMember
The sRandMember operation is used to get one or multiple random members from a set. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
Sample configuration
Sample request
sRem
The sRem operation is used to remove one or more members from a set. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
| redisMembers | The name of a member in a key. | Yes |
Sample configuration
<redis.sRem>
<redisKey>{$ctx:redisKey}</redisKey>
<redisMembers>{$ctx:redisMembers}</redisMembers>
</redis.sRem>
Sample request
sUnion
The sUnion operation is used to add multiple sets. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
Sample configuration
Sample request
sUnionStore
The sUnionStore operation is used to add multiple sets and store the resulting set in a key. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
| redisDstkey | The name of the destination key. | Yes |
Sample configuration
<redis.sUnionStore>
<redisKey>{$ctx:redisKey}</redisKey>
<redisDstkey>{$ctx:redisDstkey}</redisDstkey>
</redis.sUnionStore>
Sample request
Sorted Sets¶
zadd
The zadd operation adds one or more members to a sorted set, or update its score if a specified member already exists. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
| redisScore | The score of the sorted set. | Yes |
| redisMembers | The name of a member you want to add. | Yes |
Sample configuration
<redis.zadd>
<redisKey>{$ctx:redisKey}</redisKey>
<redisScore>{$ctx:redisScore}</redisScore>
<redisMember>{$ctx:redisMember}</redisMember>
</redis.zadd>
Sample request
zCount
The zCount operation retrieves a count of members in a sorted set, with scores that are within the min and max values specified. See the related documentation for more information.
| Parameter Name | Description | Required |
|---|---|---|
| redisKey | The name of the key. | Yes |
| redisMin | The minimum score value. | Yes |
| redisMax | The maximum score value. | Yes |
Sample configuration
<redis.zCount>
<redisKey>{$ctx:redisKey}</redisKey>
<redisMin>{$ctx:redisMin}</redisMin>
<redisMax>{$ctx:redisMax}</redisMax>
</redis.zCount>
Sample request