redis-service
Service icon

Redis Service

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 30 Jan (23 hours ago)
 by 
5.0
 (2 ratings)
redis-service

Redis Service

Documentation
1.0.0

Methods and descriptions

  • Set_Add
    Adds a single member to a Redis set at the given key, creating the set if needed, and returns a result record with status and an error message when the add fails (wrapper over SADD for one value).

  • Set_AddMultiple
    Adds multiple members to a set from an OutSystems list of RedisValue records, returning the number of elements that were actually newly added to the set (not counting existing ones).

  • Set_Remove
    Removes a single member from the set at the specified key and returns an operation result indicating success or failure, effectively wrapping SREM for one element.

  • Set_RemoveMultiple
    Removes multiple specified members from a set and outputs how many elements were actually removed, ignoring values that were not present in the set.

  • Set_Length
    Returns the cardinality of the set stored at the given key, or zero when the key does not exist, mapping directly to the Redis SCARD command.

  • Set_Members
    Retrieves all members of a set as an OutSystems list of RedisValue records, using RedisStore.SetMembers under the hood (equivalent to SMEMBERS).

  • Set_Contains
    Checks whether a given value is a member of the set at the specified key and returns a boolean flag, corresponding to the Redis SISMEMBER command.

  • AcquireLock
    Tries to acquire a distributed lock for a resource key using RedLock.NET, with configurable expiry, wait, and retry times, returning both a RedLock object (to be kept in scope) and a flag indicating if the lock was acquired.

  • ReleaseLock
    Releases a previously acquired distributed lock by casting the stored lock object back to IRedLock and delegating to RedisStore.ReleaseLock.

  • ListKeys
    Lists Redis keys that match a given pattern with paging (page size and offset), and for each key fills an OutSystems record with the key name, type, TTL in seconds, and whether it is permanent; the result record is always successful.

  • GetType
    Returns the Redis data type for a single key (for example, string, set, list) and sets the status code to error when no entry is found (type “None”).

  • GetTimeToLive
    Retrieves the TTL for a key, returning whether the key is permanent and its remaining lifetime in seconds, always marking the operation as successful even if the key has no expiration.

  • ExpireKey
    Sets an expiration (in seconds) on a key using RedisStore.Expire, returning a result record that indicates if the expiration was successfully applied.

  • IncrementKey
    Atomically increments the numeric value stored at a key and outputs the new value along with a status record that reports an error when the resulting value is not greater than zero.

  • DeleteKey
    Deletes a key and any associated value regardless of data type, returning a success status when the key was removed and an error message if the delete operation fails.

  • SetPermStringValue
    Writes a string value to a key without expiration, signaling success when a non‑null value is provided and the underlying Redis set operation succeeds.

  • GetStringValue
    Reads a string value from Redis into an OutSystems text output parameter, marking the operation as an error when the key does not exist or returns null.

  • SetStringValue
    Writes a string value with a specific TTL (in seconds) to Redis, combining value assignment and expiration in a single call and returning a result record for success or failure.