Constructs a scredis.RedisCluster instance using the default config.
Constructs a scredis.RedisCluster instance using the default config.
Actor system
the constructed scredis.RedisCluster
Constructs a scredis.RedisCluster instance using the default config.
Constructs a scredis.RedisCluster instance using the default config.
the constructed scredis.RedisCluster
Constructs a scredis.RedisCluster instance from a scredis.RedisConfig.
Constructs a scredis.RedisCluster instance from a scredis.RedisConfig.
the constructed scredis.RedisCluster
Appends a value to a key.
Appends a value to a key.
the key to be appended
the value to append
the length of the string after the append operation
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type string
Counts the number of bits set to 1 in a string from start offset to stop offset.
Counts the number of bits set to 1 in a string from start offset to stop offset.
the key for which the bitcount should be returned
start offset (defaults to 0)
stop offset (defaults to -1)
the number of bits set to 1 in the specified interval
2.6.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type string
Non-existent keys are treated as empty strings, so the command will return zero.
Performs a bitwise operation between multiple strings.
Performs a bitwise operation between multiple strings.
scredis.BitOp to perform
destination key where the result of the operation will be stored
keys to perform the operation upon
the size of the string stored in the destination key, that is equal to the size of the longest input string
2.6.0
[[scredis.exceptions.RedisErrorResponseException]]
if at least one of the values stored at keys is not of type string
When an operation is performed between strings having different lengths, all the strings shorter than the longest string in the set are treated as if they were zero-padded up to the length of the longest string. The same holds true for non-existent keys, that are considered as a stream of zero bytes up to the length of the longest string.
Return the position of the first bit set to 1 or 0 in a string.
Return the position of the first bit set to 1 or 0 in a string.
string key
provide true to look for 1s and false to look for 0s
start offset, in bytes
stop offset, in bytes
the position of the first bit set to 1 or 0, according to the request
2.8.7
[[scredis.exceptions.RedisErrorResponseException]]
if key is not of type string
The position is returned thinking at the string as an array of bits from left to right where the first byte most significant bit is at position 0, the second byte most significant big is at position 8 and so forth. The range is interpreted as a range of bytes and not a range of bits, so start=0 and end=2 means to look at the first three bytes. If we look for set bits (the bit argument is 1) and the string is empty or composed of just zero bytes, -1 is returned. If we look for clear bits (the bit argument is 0) and the string only contains bit set to 1, the function returns the first bit not part of the string on the right. So if the string is tree bytes set to the value 0xff the command BITPOS key 0 will return 24, since up to bit 23 all the bits are 1. Basically the function consider the right of the string as padded with zeros if you look for clear bits and specify no range or the start argument only. However this behavior changes if you are looking for clear bits and specify a range with both start and stop. If no clear bit is found in the specified range, the function returns -1 as the user specified a clear range and there are no 0 bits in that range.
Assign new hash slots to receiving node
Assign new hash slots to receiving node
a slot
more slots
3.0.0
Return the number of failure reports active for a given node.
Return the number of failure reports active for a given node.
node to get failures for
the number of active failure reports for the node
3.0.0
Return the number of local keys in the specified hash slot.
Return the number of local keys in the specified hash slot.
slot to count keys in
the number of local keys in the specified hash slot
3.0.0
Set hash slots as unbound in receiving node.
Set hash slots as unbound in receiving node.
a slot
more slots
3.0.0
Forces a slave to perform a manual failover of its master.
Forces a slave to perform a manual failover of its master.
Forces a slave to perform a manual failover of its master.
Forces a slave to perform a manual failover of its master.
FORCE option: manual failover when the master is down.
3.0.0
Forces a slave to perform a manual failover of its master.
Forces a slave to perform a manual failover of its master.
TAKEOVER option: manual failover without cluster consensus. TAKEOVER option implies everything FORCE implies, but also does not uses any cluster authorization in order to failover.
3.0.0
Remove a node from the nodes table.
Remove a node from the nodes table.
node to remove
3.0.0
Return local key names in the specified hash slot.
Return local key names in the specified hash slot.
slot to get key names from
number of keys to return
local key names in the specified hash slot
3.0.0
Provides info about Redis Cluster node state.
Provides info about Redis Cluster node state.
Key-value mapping of Redis Cluster vital parameters.
3.0.0
Returns the hash slot of the specified key.
Returns the hash slot of the specified key.
3.0.0
Force a node cluster to handshake with another node.
Force a node cluster to handshake with another node.
ip address of
3.0.0
Get Cluster config for the node.
Get Cluster config for the node.
3.0.0
Reconfigure a node as a slave of the specified master node.
Reconfigure a node as a slave of the specified master node.
master node to replicate
3.0.0
Reset a Redis Cluster node.
Reset a Redis Cluster node.
3.0.0
Reset a Redis Cluster node with HARD option.
Reset a Redis Cluster node with HARD option.
3.0.0
Forces the node to save cluster state on disk.
Forces the node to save cluster state on disk.
3.0.0
Set the configuration epoch in a new node.
Set the configuration epoch in a new node.
the config epoch to set
3.0.0
Set a hash slot in importing state.
Set a hash slot in importing state.
slot to import
node to import from
3.0.0
Set a hash slot in migrating state.
Set a hash slot in migrating state.
slot to migrate
node to migrate to
3.0.0
Bind the hash slot to a different node.
Bind the hash slot to a different node.
slot to associate with node
node to be associated with slot
3.0.0
Clear any importing / migrating state from hash slot.
Clear any importing / migrating state from hash slot.
slot to clear of migrating/importing state
3.0.0
List slave nodes of the specified master node.
List slave nodes of the specified master node.
node to list slave nodes of
slave nodes of the given master
3.0.0
Get array of Cluster slot to node mappings.
Get array of Cluster slot to node mappings.
List of cluster slot ranges, with respective master and slave nodes.
3.0.0
Decrements the integer value of a key by one.
Decrements the integer value of a key by one.
the key to decrement
the value of key after the decrement
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the key contains a value of the wrong type or contains a string that cannot be
represented as integer
If the key does not exist, it is set to 0 before performing the operation.
Decrements the integer value of a key by the given amount.
Decrements the integer value of a key by the given amount.
the key to decrement
the decrement
the value of key after the decrement
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the key contains a value of the wrong type or contains
a string that cannot be represented as integer
If the key does not exist, it is set to 0 before performing the operation.
Deletes one or multiple keys.
Deletes one or multiple keys.
key(s) to delete
the number of keys that were deleted
1.0.0
a key is ignored if it does not exist
Returns a serialized version of the value stored at the specified key.
Returns a serialized version of the value stored at the specified key.
key to dump
the serialized value or None
if the key does not exist
2.6.0
Executes a Lua script that does not require any keys or arguments.
Executes a Lua script that does not require any keys or arguments.
the LUA script
keys to be used in the script
arguments to be used in the script
2.6.0
[[scredis.exceptions.RedisErrorResponseException]]
if an error occurs while running the script
[[scredis.exceptions.RedisProtocolException]]
if the result could not be decoded by provided Decoder
Executes a cached Lua script that does not require any keys or arguments by its SHA1 digest.
Executes a cached Lua script that does not require any keys or arguments by its SHA1 digest.
the SHA1 digest
keys to be used in the script
arguments to be used in the script
2.6.0
[[scredis.exceptions.RedisErrorResponseException]]
if there is no script corresponding to the provided SHA1 digest or if an error
occurs while running the script
[[scredis.exceptions.RedisProtocolException]]
if the result could not be decoded by provided Decoder
Determines if a key exists.
Determines if a key exists.
key to check for existence
true if the key exists, false otherwise
1.0.0
Sets a key's time to live in seconds.
Sets a key's time to live in seconds.
key to expire
time-to-live in seconds
true if the ttl was set, false if key does not exist or the timeout could not be set
1.0.0
Sets the expiration for a key as a UNIX timestamp.
Sets the expiration for a key as a UNIX timestamp.
key to expire
UNIX timestamp at which the key should expire
true if the ttl was set, false if key does not exist or the timeout could not be set
1.2.0
Returns the value stored at key.
Returns the value stored at key.
the target key
value stored at key, or None
if the key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type string
Returns the bit value at offset in the string value stored at key.
Returns the bit value at offset in the string value stored at key.
the target key
the position in the string
true if the bit is set to 1, false otherwise
2.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type string
Returns a substring of the string stored at a key.
Returns a substring of the string stored at a key.
the target key
the start offset (inclusive)
the stop offset (inclusive)
the substring determined by the specified offsets, or the empty string if the key does not exist
2.4.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type string
Both offsets are inclusive, i.e. [start, stop]. The function handles out of range requests by limiting the resulting range to the actual length of the string.
Sets the string value of a key and return its old value.
Sets the string value of a key and return its old value.
the target key
the value to set key to
the old value, or None
if the latter did not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type string
Deletes one or more hash fields.
Deletes one or more hash fields.
key of the hash
field(s) to be deleted from hash
the number of fields that were removed from the hash, not including specified but non existing fields
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
Specified fields that do not exist within this hash are ignored. If key does not exist, it is treated as an empty hash and this command returns 0. Redis versions older than 2.4 can only remove a field per call.
Determines if a hash field exists.
Determines if a hash field exists.
hash key
name of the field
true if the hash contains field, false if the hash does not contain it or the key does not exists
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
Returns the value of a hash field.
Returns the value of a hash field.
hash key
field name to retrieve
the value associated with field name, or None
when field is not present in the hash
or key does not exist
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
Returns all the fields and values in a hash.
Returns all the fields and values in a hash.
hash key
key-value pairs stored in hash with key, or None
when hash is empty or key does not
exist
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
Increments the integer value of a hash field by the given number.
Increments the integer value of a hash field by the given number.
hash key
field name to increment
increment
the value at field after the increment operation
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the field does not hold an integer value or if the value stored at key is not of
type hash
If key does not exist, a new key holding a hash is created. If field does not exist the value is set to 0 before the operation is performed.
Increments the float value of a hash field by the given amount.
Increments the float value of a hash field by the given amount.
hash key
field name to increment
increment
the value at field after the increment operation
2.6.0
[[scredis.exceptions.RedisErrorResponseException]]
if the field does not hold a floating point value or if the value stored at key is
not of type hash
If key does not exist, a new key holding a hash is created. If field does not exist the value is set to 0 before the operation is performed.
Returns all the fields in a hash.
Returns all the fields in a hash.
hash key
set of field names or the empty set if the hash is empty or the key does not exist
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
Returns the number of fields contained in the hash stored at key.
Returns the number of fields contained in the hash stored at key.
hash key
number of fields in the hash, or 0 if the key does not exist
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
Incrementally iterates through the fields of a hash.
Incrementally iterates through the fields of a hash.
the offset
when defined, the command only returns elements matching the pattern
when defined, provides a hint of how many elements should be returned
a pair containing the next cursor as its first element and the list of fields (key-value pairs) as its second element
2.8.0
Sets the string value of a hash field.
Sets the string value of a hash field.
hash key
field name to set
value to set
true if field is a new field in the hash and value was set, false if field already exists and the value was updated
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
If the field already exists in the hash, it is overwritten.
Sets the value of a hash field, only if the field does not exist.
Sets the value of a hash field, only if the field does not exist.
hash key
field name to set
value to set
true if field is a new field in the hash and value was set, false if field already exists and no operation was performed
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
Returns the length of the value associated with field in the hash stored at key.
Returns the length of the value associated with field in the hash stored at key. For numbers it is a count of their digits (+1 if number is negative) For booleans it is true=4 and false=5 For strings it is number of bytes they occupy. ONLY if you don't use utf characters it will be their length. If the key or the field do not exist, 0 is returned.
hash key
field name to set
the string length of the value associated with field, or zero when field is not present in the hash or key does not exist at all.
Returns all the values in a hash.
Returns all the values in a hash.
hash key
list of values, or the empty list if hash is empty or key does not exist
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
Returns the values associated to the specified hash fields.
Returns the values associated to the specified hash fields.
hash key
field(s) to retrieve
list of value(s) associated to the specified field name(s)
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
For every field that does not exist, None
is returned.
Returns a Map
containing field-value pairs associated to the specified hash fields.
Returns a Map
containing field-value pairs associated to the specified hash fields.
hash key
field(s) to retrieve
field-value pairs associated to the specified field name(s)
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
Every non-existent field gets removed from the resulting Map
.
Sets multiple hash fields to multiple values.
Sets multiple hash fields to multiple values.
hash key
field-value pair(s) to be set
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value stored at key is not of type hash
This command overwrites any existing fields in the hash. If key does not exist, a new key holding a hash is created
Increments the integer value of a key by one.
Increments the integer value of a key by one.
the key to increment
the value of key after the increment
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the key contains a value of the wrong type or contains a string that cannot be
represented as integer
If the key does not exist, it is set to 0 before performing the operation.
Increments the integer value of a key by the given amount.
Increments the integer value of a key by the given amount.
the key to increment
the increment
the value of key after the decrement
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the key contains a value of the wrong type or contains
a string that cannot be represented as integer
If the key does not exist, it is set to 0 before performing the operation.
Increment the float value of a key by the given amount.
Increment the float value of a key by the given amount.
the key to increment
the increment
the value of key after the decrement
2.6.0
[[scredis.exceptions.RedisErrorResponseException]]
if the key contains a value of the wrong type, the current key content or the
specified increment are not parseable as a double precision floating point number
If the key does not exist, it is set to 0 before performing the operation.
Finds all keys matching the given pattern.
Finds all keys matching the given pattern.
pattern to search for
the matched keys, or the empty set if no keys match the given pattern
1.0.0
Returns an element from a list by its index.
Returns an element from a list by its index.
list key
zero-based position in the list
the requested element, or None
when index is out of range
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
The index is zero-based, so 0 means the first element, 1 the second element and so on. Negative indices can be used to designate elements starting at the tail of the list. Here, -1 means the last element, -2 means the penultimate and so forth.
Inserts an element before or after another element in a list.
Inserts an element before or after another element in a list.
list key
tell if a new value should be placed after of before pivot
value after/before which the element should be inserted
element to be inserted
the length of the list after the insert operation, or None if the index is out of range
2.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
Returns the length of a list.
Returns the length of a list.
list key
the length of the list at key, or 0 if the key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
Removes and returns the first element of a list.
Removes and returns the first element of a list.
list key
the popped element, or None
if the key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
Prepends one or multiple values to a list.
Prepends one or multiple values to a list.
list key
value(s) to prepend
the length of the list after the push operations
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
If key does not exist, it is created as empty list before performing the push operation. Redis versions older than 2.4 can only push one value per call.
Prepends a value to a list, only if the list exists.
Prepends a value to a list, only if the list exists.
list key
value to prepend
the length of the list after the push operation
2.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
Returns a range of elements from a list.
Returns a range of elements from a list.
list key
start offset (inclusive)
stop offset (inclusive)
list of elements in the specified range, or the empty list if there are no such elements or the key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
The offsets start and end are zero-based indexes, with 0 being the first element of the list (the head of the list), 1 being the next element and so on. These offsets can also be negative numbers indicating offsets starting at the end of the list. For example, -1 is the last element of the list, -2 the penultimate, and so on. Both offsets are inclusive, i.e. LRANGE key 0 10 will return 11 elements (if they exist).
Removes the first count occurrences of elements equal to value from the list stored at key.
Removes the first count occurrences of elements equal to value from the list stored at key.
list key
value to be removed from the list
indicates the number of found values that should be removed, see above note
the number of removed elements
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
The count argument influences the operation in the following ways:
count > 0: Remove elements equal to value moving from head to tail. count < 0: Remove elements equal to value moving from tail to head. count = 0: Remove all elements equal to value.
Sets the value of an element in a list by its index.
Sets the value of an element in a list by its index.
list key
position of the element to set
value to be set at index
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if index is out of range or if key contains a non-list value
Trims a list to the specified range.
Trims a list to the specified range.
list key
start offset (inclusive)
stop offset (inclusive)
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
Out of range indexes will not produce an error: if start is larger than the end of the list, or start > end, the result will be an empty list (which causes key to be removed). If end is larger than the end of the list, Redis will treat it like the last element of the list.
Returns the values of all specified keys.
Returns the values of all specified keys.
the keys to fetch
list of value(s) stored at the specified key(s)
1.0.0
For every key that does not hold a string value or does not exist, None
is returned.
Because of this, the operation never fails.
Returns a Map
containing the specified key(s) paired to their respective value(s).
Returns a Map
containing the specified key(s) paired to their respective value(s).
the keys to fetch
map of key-value pairs
1.0.0
Every key that does not hold a string value or does not exist will be removed from the
resulting Map
.
Atomically sets multiple keys to multiple values.
Atomically sets multiple keys to multiple values.
map of key-value pairs to set
1.0.1
MSET replaces existing values with new values, just as regular SET.
Atomically sets multiple keys to multiple values, only if none of the keys exist.
Atomically sets multiple keys to multiple values, only if none of the keys exist.
map of key-value pairs to set
true if all the keys were set, false if at least one key already existed and thus no operation was performed.
1.0.1
MSETNX will not perform any operation at all even if just a single key already exists.
Atomically transfers a key from a Redis instance to another one.
Atomically transfers a key from a Redis instance to another one.
key to transfer
destination host
destination port
destination database
timeout duration, up to milliseconds precision
if true, do not remove the key from the local instance
if true, replace existing key on the remote instance
2.6.0
[[scredis.exceptions.RedisErrorResponseException]]
if an error occurs
Moves a key to another database.
Moves a key to another database.
key to move
destination database
true if key was moved, false otherwise
1.0.0
Returns the kind of internal representation used in order to store the value associated with a key.
Returns the kind of internal representation used in order to store the value associated with a key.
the key
the object encoding or None
if the key does not exist
2.2.3
Objects can be encoded in different ways:
Strings can be encoded as raw
or int
Lists can be encoded as ziplist
or linkedlist
Sets can be encoded as intset
or hashtable
Hashes can be encoded as zipmap
or hashtable
SortedSets can be encoded as ziplist
or skiplist
Returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).
Returns the number of seconds since the object stored at the specified key is idle (not requested by read or write operations).
the key
the number of seconds since the object is idle or None
if the key does not exist
2.2.3
While the value is returned in seconds the actual resolution of this timer is 10 seconds, but may vary in future implementations.
Returns the number of references of the value associated with the specified key.
Returns the number of references of the value associated with the specified key.
the key
the number of references or None
if the key does not exist
2.2.3
Sets a key's time to live in milliseconds.
Sets a key's time to live in milliseconds.
key to expire
time-to-live in milliseconds
true if the ttl was set, false if key does not exist or the timeout could not be set
2.6.0
Sets the expiration for a key as a UNIX timestamp specified in milliseconds.
Sets the expiration for a key as a UNIX timestamp specified in milliseconds.
key to expire
UNIX milliseconds-timestamp at which the key should expire
true if the ttl was set, false if key does not exist or the timeout could not be set
2.6.0
Sets the value and expiration in milliseconds of a key.
Sets the value and expiration in milliseconds of a key.
target key to set
value to be stored at key
time-to-live in milliseconds
2.6.0
If key already holds a value, it is overwritten, regardless of its type.
Gets the time to live for a key in milliseconds.
Gets the time to live for a key in milliseconds.
result match { case Left(false) => // key does not exist case Left(true) => // key exists but has no associated expire case Right(ttl) => }
the target key
Right(ttl)
where ttl is the time-to-live in milliseconds for specified key,
Left(false)
if key does not exist or Left(true)
if key exists but has no associated
expire
2.6.0
For Redis
version <= 2.8.x, Left(false)
will be returned when the key does not
exists and when it exists but has no associated expire (Redis
returns the same error code
for both cases). In other words, you can simply check the following
result match { case Left(_) => case Right(ttl) => }
Removes the expiration from a key.
Removes the expiration from a key.
key to persist
true if key was persisted, false if key does not exist or does not have an associated timeout
2.2.0
Adds all the element arguments to the HyperLogLog data structure stored at specified key.
Adds all the element arguments to the HyperLogLog data structure stored at specified key.
the key of the HyperLogLog data structure
element(s) to add to the HyperLogLog data structure
true if at least one HyperLogLog internal register was altered, false otherwise
2.8.9
[[scredis.exceptions.RedisErrorResponseException]]
if key is not of HyperLogLog type
The HyperLogLog data structure can be used in order to count unique elements in a set using just a small constant amount of memory, specifically 12k bytes for every HyperLogLog (plus a few bytes for the key itself). The returned cardinality of the observed set is not exact, but approximated with a standard error of 0.81%.
When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.
When called with a single key, returns the approximated cardinality computed by the HyperLogLog data structure stored at the specified variable, which is 0 if the variable does not exist.
When called with multiple keys, returns the approximated cardinality of the union of the HyperLogLogs passed, by internally merging the HyperLogLogs stored at the provided keys into a temporary HyperLogLog.
key(s) of the HyperLogLog data structure to count
the approximate number of unique elements observed via PFADD
2.8.9
[[scredis.exceptions.RedisErrorResponseException]]
if at least one key is not of HyperLogLog type
The HyperLogLog data structure can be used in order to count unique elements in a set using just a small constant amount of memory, specifically 12k bytes for every HyperLogLog (plus a few bytes for the key itself). The returned cardinality of the observed set is not exact, but approximated with a standard error of 0.81%.
Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.
Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of the observed Sets of the source HyperLogLog structures.
The computed merged HyperLogLog is set to the destination variable, which is created if does not exist (defauling to an empty HyperLogLog).
the destination key where the result should be stored
keys of the HyperLogLog data structure to merge
2.8.9
[[scredis.exceptions.RedisErrorResponseException]]
if at least one key is not of HyperLogLog type
The HyperLogLog data structure can be used in order to count unique elements in a set using just a small constant amount of memory, specifically 12k bytes for every HyperLogLog (plus a few bytes for the key itself). The returned cardinality of the observed set is not exact, but approximated with a standard error of 0.81%.
Lists the currently active channels.
Lists the currently active channels. An active channel is a Pub/Sub channel with one or more subscribers (not including clients subscribed to patterns).
optional pattern to filter returned channels
the currently active channels, optionally matching the specified pattern
2.8.0
If no pattern is specified, all the channels are listed, otherwise if pattern is specified only channels matching the specified glob-style pattern are listed.
Returns the number of subscriptions to patterns (that are performed using the PSUBSCRIBE command).
Returns the number of subscriptions to patterns (that are performed using the PSUBSCRIBE command).
the number of subscriptions to patterns
2.8.0
Note that this is not just the count of clients subscribed to patterns but the total number of patterns all the clients are subscribed to.
Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channels.
Returns the number of subscribers (not counting clients subscribed to patterns) for the specified channels.
channel name(s)
a map of channels to number of subscribers for every provided channel
2.8.0
Publishes a message to a channel.
Publishes a message to a channel.
the name of the channel
the message payload
the number of clients that received the message
2.0.0
Removes and returns the last element of a list.
Removes and returns the last element of a list.
list key
the popped element, or None
if the key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
Removes the last element in a list, appends it to another list and returns it.
Removes the last element in a list, appends it to another list and returns it.
key of list to be pop from
key of list to be push to
the popped element, or None
if the key does not exist
1.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
Appends one or multiple values to a list.
Appends one or multiple values to a list.
list key
value(s) to prepend
the length of the list after the push operations
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
If key does not exist, it is created as empty list before performing the push operation. Redis versions older than 2.4 can only push one value per call.
Appends a value to a list, only if the list exists.
Appends a value to a list, only if the list exists.
list key
value to prepend
the length of the list after the push operation
2.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a non-list value
Returns a random key from the keyspace.
Returns a random key from the keyspace.
the random key or None
when the database is empty
associated timeout
1.0.0
Renames a key.
Renames a key.
source key
destination key
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the source and destination keys are the same, or when key
does not exist
if newKey already exists, it is overwritten
Renames a key, only if the new key does not exist.
Renames a key, only if the new key does not exist.
source key
destination key
true if key was renamed to newKey, false if newKey already exists
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if the source and destination keys are the same, or when key does not exist
Creates a key using the provided serialized value, previously obtained using DUMP.
Creates a key using the provided serialized value, previously obtained using DUMP.
destination key
serialized value, previously obtained using DUMP
optional time-to-live duration of newly created key (expire)
2.6.0
[[scredis.exceptions.RedisErrorResponseException]]
if the value could not be restored
Adds one or more members to a set.
Adds one or more members to a set.
set key
member(s) to add
the number of members added to the set, not including all the members that were already present
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a set
Returns the number of members in a set.
Returns the number of members in a set.
set key
the cardinality (number of members) of the set, or 0 if key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a set
Returns the set resulting from the difference between the first set and all the successive sets.
Returns the set resulting from the difference between the first set and all the successive sets.
the key of the first set
key(s) of successive set(s) whose members will be substracted from the first one
the resulting set, or the empty set if the first key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if some keys contain a value that is not a set
Stores the set resulting from the difference between the first set and all the successive sets.
Stores the set resulting from the difference between the first set and all the successive sets.
key where to store the resulting set
key of first set
keys of sets to be substracted from first set, if empty, first set is simply copied to destKey
the cardinality of the resulting set
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if some keys contain a value that is not a set
If destKey already exists, it is overwritten.
Intersects multiple sets.
Intersects multiple sets.
keys of sets to be intersected together
the resulting set, or the empty set if the first key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if some keys contain a value that is not a set
Intersects multiple sets and stores the resulting set in a key.
Intersects multiple sets and stores the resulting set in a key.
key where to store the resulting set
keys of sets to be intersected together, if only one is specified, it is simply copied to destKey
the cardinality of the resulting set
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if some keys contain a value that is not a set
If destKey already exists, it is overwritten.
Determines if a given value is a member of a set.
Determines if a given value is a member of a set.
set key
value to be tested
true if the provided value is a member of the set stored at key, false otherwise
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a set
Returns all the members of a set.
Returns all the members of a set.
set key
set stored at key, or the empty set if key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a set
Moves a member from one set to another.
Moves a member from one set to another.
key of source set
value to be moved from source set to destination set
true if the member was moved, false if the element is not a member of source set and no operation was performed
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if sourceKey or destKey contains a value that is not a set
Removes and returns a random member from a set.
Removes and returns a random member from a set.
set key
random member, or None
if key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a set
This operation is similar to SRANDMEMBER, that returns a random element from a set but does not remove it.
Removes and returns a random 'count' members from a set.
Removes and returns a random 'count' members from a set.
set key
maximum number of returned elements
list of random members which size is less or equal to 'count'
3.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a set
This operation is similar to SRANDMEMBER, that returns a random element from a set but does not remove it.
Returns a random member from a set (without removing it).
Returns a random member from a set (without removing it).
set key
random member, or None
if key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a set
Returns a random member from a set (without removing it).
Returns a random member from a set (without removing it).
set key
number of member to randomly retrieve
set of random members, or the empty set if key does not exist
2.6.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a set
Removes one or more members from a set.
Removes one or more members from a set.
set key
members to remove from set
the number of members that were removed from the set, not including non-existing members
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a set
Redis versions older than 2.4 can only remove one member per call.
Incrementally iterates the elements of a set.
Incrementally iterates the elements of a set.
the offset
when defined, the command only returns elements matching the pattern
when defined, provides a hint of how many elements should be returned
a pair containing the next cursor as its first element and the set of elements as its second element
2.8.0
Computes the union of multiple sets.
Computes the union of multiple sets.
keys of sets to be included in the union computation
the resulting set, or the empty set if the first key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if some keys contain a value that is not a set
Computes the union of multiple sets and stores the resulting set in a key.
Computes the union of multiple sets and stores the resulting set in a key.
key where to store the resulting set
keys of sets to be included in the union computation, if only one is specified, it is simply copied to destKey
the cardinality of the resulting set
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if some keys contain a value that is not a set
If destKey already exists, it is overwritten.
Incrementally iterates the set of keys in the currently selected Redis database.
Incrementally iterates the set of keys in the currently selected Redis database.
the offset
when defined, the command only returns elements matching the pattern
when defined, provides a hint of how many elements should be returned
a pair containing the next cursor as its first element and the set of keys as its second element
2.8.0
Checks existence of scripts in the script cache.
Checks existence of scripts in the script cache.
SHA1 digest(s) to check for existence
SHA1 -> Boolean Map
where true means the script associated to the sha1 exists
in the cache
2.6.0
Removes all the scripts from the script cache.
Removes all the scripts from the script cache.
2.6.0
Kills the currently executing Lua script, assuming no write operation was yet performed by the script.
Kills the currently executing Lua script, assuming no write operation was yet performed by the script.
2.6.0
If the script already performed write operations it can not be killed in this way because it would violate Lua script atomicity contract. In such a case only SHUTDOWN NOSAVE is able to kill the script, killing the Redis process in an hard way preventing it to persist with half-written information.
Loads or stores the specified Lua script into the script cache.
Loads or stores the specified Lua script into the script cache.
the script to be loaded into the cache
the SHA1 digest of the stored script
2.6.0
[[scredis.exceptions.RedisErrorResponseException]]
if a compilation error occurs
The script is guaranteed to stay in the script cache forever (unless SCRIPT FLUSH is called).
Sets the string value of a key.
Sets the string value of a key.
target key to set
value to be stored at key
optional time-to-live (up to milliseconds precision)
optional condition to be met for the value to be set
true if the value was set correctly, false if a condition was specified but not met
1.0.0
If key already holds a value, it is overwritten, regardless of its type. Any previous
time to live associated with the key is discarded on successful SET operation.
The ttlOpt and conditionOpt parameters can only be used with Redis
>= 2.6.12
Sets or clears the bit at offset in the string value stored at key.
Sets or clears the bit at offset in the string value stored at key.
key for which the bit should be set
position where the bit should be set
true sets the bit to 1, false sets it to 0
2.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if the key contains a value of the wrong type
When key does not exist, a new string value is created. The string is grown to make sure it can hold a bit at offset. When the string at key is grown, added bits are set to 0.
Sets the value and expiration in seconds of a key.
Sets the value and expiration in seconds of a key.
target key to set
value to be stored at key
time-to-live in seconds
2.0.0
If key already holds a value, it is overwritten, regardless of its type.
Sets the value of a key, only if the key does not exist.
Sets the value of a key, only if the key does not exist.
target key to set
value to be stored at key
true if the key was set, false otherwise
1.0.0
Overwrites part of a string at key starting at the specified offset.
Overwrites part of a string at key starting at the specified offset.
target key
position from which the string must be overwritten
string value to be set at given offset
the length of the string after it was modified by the command
2.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if the key contains a value of the wrong type
If the offset is larger than the current length of the string at key, the string is padded with zero-bytes to make offset fit. Non-existing keys are considered as empty strings, so this command will make sure it holds a string large enough to be able to set value at offset.
Sorts the elements of a list, set or sorted set.
Sorts the elements of a list, set or sorted set.
key of list, set or sorted set to be sorted
optional pattern for sorting by external values, can also be "nosort" if the sorting operation should be skipped (useful when only sorting to retrieve objects with get). The * gets replaced by the values of the elements in the collection
optional pair of numbers (offset, count) where offset specified the number of elements to skip and count specifies the number of elements to return starting from offset
list of patterns for retrieving objects stored in external keys. The * gets replaced by the values of the elements in the collection
indicates whether elements should be sorted descendingly
indicates whether elements should be sorted lexicographically
the sorted list of elements, or the empty list if the key does not exist
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
whenever an error occurs
Sorts the elements of a list, set or sorted set and then store the result.
Sorts the elements of a list, set or sorted set and then store the result.
key of list, set or sorted set to be sorted
key of list, set or sorted set to be sorted
optional pattern for sorting by external values, can also be "nosort" if the sorting operation should be skipped (useful when only sorting to retrieve objects with get). The * gets replaced by the values of the elements in the collection
optional pair of numbers (offset, count) where offset specified the number of elements to skip and count specifies the number of elements to return starting from offset
list of patterns for retrieving objects stored in external keys. The * gets replaced by the values of the elements in the collection
indicates whether elements should be sorted descendingly
indicates whether elements should be sorted lexicographically
the number of elements in the newly stored sorted collection
1.0.0
[[scredis.exceptions.RedisErrorResponseException]]
whenever an error occurs
Returns the length of the string value stored in a key.
Returns the length of the string value stored in a key.
target key
the length of the string stored at key, or 0 when the key does not exist
2.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if the key contains a value of the wrong type
Gets the time to live for a key in seconds.
Gets the time to live for a key in seconds.
result match { case Left(false) => // key does not exist case Left(true) => // key exists but has no associated expire case Right(ttl) => }
the target key
Right(ttl)
where ttl is the time-to-live in seconds for specified key,
Left(false)
if key does not exist or Left(true)
if key exists but has no associated
expire
1.0.0
For Redis
version <= 2.8.x, Left(false)
will be returned when the key does not
exists and when it exists but has no associated expire (Redis
returns the same error code
for both cases). In other words, you can simply check the following
result match { case Left(_) => case Right(ttl) => }
Determine the type stored at key.
Determine the type stored at key.
key for which the type should be returned
type of key, or None
if key does not exist
1.0.0
This method needs to be called as follows:
client.`type`(key)
Adds one or more members to a sorted set, or update its score if it already exists.
Adds one or more members to a sorted set, or update its score if it already exists.
sorted set key
member-score pairs to be added
the number of elements added to the sorted sets, not including elements already existing for which the score was updated
2.4
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
If a specified member is already a member of the sorted set, the score is updated and the element reinserted at the right position to ensure the correct ordering.
Adds a member to a sorted set, or update its score if it already exists.
Adds a member to a sorted set, or update its score if it already exists.
sorted set key
member to add
score of the member to add
true if the member was added, or false if the member already exists
1.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
If a specified member is already a member of the sorted set, the score is updated and the element reinserted at the right position to ensure the correct ordering.
Returns the number of members in a sorted set.
Returns the number of members in a sorted set.
sorted set key
the cardinality (number of elements) of the sorted set, or 0 if key does not exist
1.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Returns the number of elements of a sorted set belonging to a given score range.
Returns the number of elements of a sorted set belonging to a given score range.
sorted set key
score lower bound
score upper bound
the number of elements in the specified score range
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Increments the score of a member in a sorted set.
Increments the score of a member in a sorted set.
sorted set key
member whose score needs to be incremented
the increment
the new score of member
1.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Intersects multiple sorted sets and stores the resulting sorted set in a new key.
Intersects multiple sorted sets and stores the resulting sorted set in a new key.
sorted set key
keys of sorted sets to intersect
aggregation function (default is Sum)
the number of elements in the resulting sorted set stored at destKey
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Intersects multiple sorted sets and stores the resulting sorted set in a new key.
Intersects multiple sorted sets and stores the resulting sorted set in a new key.
sorted set key
key to weight pairs
aggregation function (default is Sum)
the number of elements in the resulting sorted set stored at destKey
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Returns the number of elements of a sorted set belonging to a given lexical score range.
Returns the number of elements of a sorted set belonging to a given lexical score range.
sorted set key
lexical score lower bound
lexical score upper bound
the number of elements in the specified lexical score range
2.8.9
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Lexical ordering only applies when all the elements in a sorted set are inserted with the same score
Returns a range of members in a sorted set, by index.
Returns a range of members in a sorted set, by index.
sorted set key
start offset (inclusive)
stop offset (inclusive)
the set of ascendingly ordered elements in the specified range, or the empty set if key does not exist
1.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Both start and stop are zero-based indexes, where 0 is the first element, 1 is the next
element and so on. They can also be negative numbers indicating offsets from the end of the
sorted set, with -1 being the last element of the sorted set, -2 the penultimate element and
so on. Out of range indexes will not produce an error. If start is larger than the largest
index in the sorted set, or start
> end
, an empty list is returned. If end
is larger
than the end of the sorted set Redis will treat it like it is the last element of the
sorted set. The indexes are inclusive.
Returns a range of members in a sorted set, by lexical score.
Returns a range of members in a sorted set, by lexical score.
sorted set key
lexical score lower bound
lexical score upper bound
optional offset and count pair used to limit the number of matching elements
the set of ascendingly ordered elements in the specified lexical range, or the empty set if key does not exist
2.8.9
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Lexical ordering only applies when all the elements in a sorted set are inserted with the same score
Returns a range of members in a sorted set, by score.
Returns a range of members in a sorted set, by score.
sorted set key
score lower bound
score upper bound
optional offset and count pair used to limit the number of matching elements
the set of ascendingly ordered elements in the specified score range, or the empty set if key does not exist
2.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
The elements having the same score are returned in lexicographical order (this follows from a property of the sorted set implementation in Redis and does not involve further computation).
Returns a range of members with associated scores in a sorted set, by score.
Returns a range of members with associated scores in a sorted set, by score.
sorted set key
score lower bound
score upper bound
optional offset and count pair used to limit the number of matching elements
the set of ascendingly ordered element-score pairs in the specified score range, or the empty set if key does not exist
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
The elements having the same score are returned in lexicographical order (this follows from a property of the sorted set implementation in Redis and does not involve further computation).
Returns a range of members with associated scores in a sorted set, by index.
Returns a range of members with associated scores in a sorted set, by index.
sorted set key
start offset (inclusive)
end offset (inclusive)
the set of ascendingly ordered elements-score pairs in the specified range, or the empty set if key does not exist
1.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Both start and stop are zero-based indexes, where 0 is the first element, 1 is the next
element and so on. They can also be negative numbers indicating offsets from the end of the
sorted set, with -1 being the last element of the sorted set, -2 the penultimate element and
so on. Out of range indexes will not produce an error. If start is larger than the largest
index in the sorted set, or start
> end
, an empty list is returned. If end
is larger
than the end of the sorted set Redis will treat it like it is the last element of the
sorted set. The indexes are inclusive.
Determines the index of a member in a sorted set.
Determines the index of a member in a sorted set.
sorted set key
the value
the rank or index of the member, or None
if the member is not in the set or the key
does not exist
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Removes one or more members from a sorted set.
Removes one or more members from a sorted set.
sorted set key
additional values to be removed (only works with Redis >= 2.4)
the number of members removed from the sorted set, not including non existing members
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Redis versions older than 2.4 can only remove one value per call.
Removes all members in a sorted set within the given lexical range.
Removes all members in a sorted set within the given lexical range.
sorted set key
lexical score lower bound
lexical score upper bound
the number of removed elements
2.8.9
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Lexical ordering only applies when all the elements in a sorted set are inserted with the same score
Removes all members in a sorted set within the given indexes.
Removes all members in a sorted set within the given indexes.
sorted set key
the start offset or index (inclusive)
the stop offset or index (inclusive)
the number of members removed
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Both start and stop are zero-based inclusive indexes with 0 being the element with the lowest score. These indexes can be negative numbers, where they indicate offsets starting at the element with the highest score. For example: -1 is the element with the highest score, -2 the element with the second highest score and so forth.
Removes all members in a sorted set within the given scores range.
Removes all members in a sorted set within the given scores range.
sorted set key
score lower bound
score upper bound
the number of members removed
1.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Since version 2.1.6, min and max can be exclusive, following the syntax of ZRANGEBYSCORE.
Returns a range of members in a sorted set, by index, with scores ordered from high to low.
Returns a range of members in a sorted set, by index, with scores ordered from high to low.
sorted set key
start offset (inclusive)
stop offset (inclusive)
the set of descendingly ordered elements in the specified range, or the empty set if key does not exist
1.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Apart from the reversed ordering, ZREVRANGE is similar to ZRANGE.
Returns a range of members in a sorted set, by score, with scores ordered from high to low.
Returns a range of members in a sorted set, by score, with scores ordered from high to low.
sorted set key
score upper bound
score lower bound
optional offset and count pair used to limit the number of matching elements
the set of descendingly ordered elements in the specified score range, or the empty set if key does not exist
2.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Apart from the reversed ordering, ZREVRANGEBYSCORE is similar to ZRANGEBYSCORE. The elements having the same score are returned in reverse lexicographical order.
Return a range of members with associated scores in a sorted set, by score, with scores ordered from high to low.
Return a range of members with associated scores in a sorted set, by score, with scores ordered from high to low.
sorted set key
score upper bound
score lower bound
optional offset and count pair used to limit the number of matching elements
the set of descendingly ordered elements in the specified score range, or the empty set if key does not exist
2.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Apart from the reversed ordering, ZREVRANGEBYSCORE is similar to ZRANGEBYSCORE. The elements having the same score are returned in reverse lexicographical order.
Returns a range of members in a sorted set, by index, with scores ordered from high to low.
Returns a range of members in a sorted set, by index, with scores ordered from high to low.
sorted set key
start offset (inclusive)
stop offset (inclusive)
the set of descendingly ordered elements-score pairs in the specified range, or the empty set if key does not exist
1.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Apart from the reversed ordering, ZREVRANGE is similar to ZRANGE. The elements having the same score are returned in reverse lexicographical order.
Determine the index of a member in a sorted set, with scores ordered from high to low.
Determine the index of a member in a sorted set, with scores ordered from high to low.
sorted set key
the value
the rank or index of the member, or None
if the member is not in the set or the key
does not exist
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Incrementally iterates the elements (value-score pairs) of a sorted set.
Incrementally iterates the elements (value-score pairs) of a sorted set.
the offset
when defined, the command only returns elements matching the pattern
when defined, provides a hint of how many elements should be returned
a pair containing the next cursor as its first element and the sorted set of elements (value-score pairs) as its second element
2.8.0
Returns the score associated with the given member in a sorted set.
Returns the score associated with the given member in a sorted set.
sorted set key
the value
the score of member, or None
if the latter is not in the sorted set or the key does
not exist
1.2.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.
Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.
sorted set key
keys of sorted sets
aggregation function (default is Sum)
the number of elements in the resulting sorted set stored at destKey
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.
Computes the union of multiple sorted sets and stores the resulting sorted set in a new key.
sorted set key
aggregation function (default is Sum)
the number of elements in the resulting sorted set stored at destKey
2.0.0
[[scredis.exceptions.RedisErrorResponseException]]
if key contains a value that is not a sorted set
Defines a
RedisCluster
scredis.Client supporting all non-blocking commands that can be addressed to either any cluster node or be automatically routed to the correct node.