Deliberately simple, high-performance Redis (2.0+) client for Clojure.
Deliberately simple, high-performance Redis (2.0+) client for Clojure.
(append key value)
APPEND key value
Append a value to a key.
Available since: 2.0.0.
Time complexity: O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation.
APPEND key value Append a value to a key. Available since: 2.0.0. Time complexity: O(1). The amortized time complexity is O(1) assuming the appended value is small and the already present value is of any size, since the dynamic string library used by Redis will double the free space available on every reallocation.
(atomically watch-keys & body)
Executes all Redis commands in body as a single transaction and returns server response vector or the empty vector if transaction failed.
Body may contain a (discard) call to abort transaction.
Executes all Redis commands in body as a single transaction and returns server response vector or the empty vector if transaction failed. Body may contain a (discard) call to abort transaction.
(auth password)
AUTH password
Authenticate to the server.
Available since: 1.0.0.
Time complexity:
AUTH password Authenticate to the server. Available since: 1.0.0. Time complexity:
(bgrewriteaof)
BGREWRITEAOF
Asynchronously rewrite the append-only file.
Available since: 1.0.0.
Time complexity:
BGREWRITEAOF Asynchronously rewrite the append-only file. Available since: 1.0.0. Time complexity:
(bgsave)
BGSAVE
Asynchronously save the dataset to disk.
Available since: 1.0.0.
Time complexity:
BGSAVE Asynchronously save the dataset to disk. Available since: 1.0.0. Time complexity:
(bitcount key & args)
BITCOUNT key [start] [end]
Count set bits in a string.
Available since: 2.6.0.
Time complexity: O(N)
BITCOUNT key [start] [end] Count set bits in a string. Available since: 2.6.0. Time complexity: O(N)
(bitop operation destkey key & args)
BITOP operation destkey key [key ...]
Perform bitwise operations between strings.
Available since: 2.6.0.
Time complexity: O(N)
BITOP operation destkey key [key ...] Perform bitwise operations between strings. Available since: 2.6.0. Time complexity: O(N)
(blpop key & args)
BLPOP key [key ...] timeout
Remove and get the first element in a list, or block until one is available.
Available since: 2.0.0.
Time complexity: O(1)
BLPOP key [key ...] timeout Remove and get the first element in a list, or block until one is available. Available since: 2.0.0. Time complexity: O(1)
(brpop key & args)
BRPOP key [key ...] timeout
Remove and get the last element in a list, or block until one is available.
Available since: 2.0.0.
Time complexity: O(1)
BRPOP key [key ...] timeout Remove and get the last element in a list, or block until one is available. Available since: 2.0.0. Time complexity: O(1)
(brpoplpush source destination timeout)
BRPOPLPUSH source destination timeout
Pop a value from a list, push it to another list and return it; or block until one is available.
Available since: 2.2.0.
Time complexity: O(1)
BRPOPLPUSH source destination timeout Pop a value from a list, push it to another list and return it; or block until one is available. Available since: 2.2.0. Time complexity: O(1)
(config-get parameter)
CONFIG GET parameter
Get the value of a configuration parameter.
Available since: 2.0.0.
Time complexity:
CONFIG GET parameter Get the value of a configuration parameter. Available since: 2.0.0. Time complexity:
(config-resetstat)
CONFIG RESETSTAT
Reset the stats returned by INFO.
Available since: 2.0.0.
Time complexity: O(1)
CONFIG RESETSTAT Reset the stats returned by INFO. Available since: 2.0.0. Time complexity: O(1)
(config-set parameter value)
CONFIG SET parameter value
Set a configuration parameter to the given value.
Available since: 2.0.0.
Time complexity:
CONFIG SET parameter value Set a configuration parameter to the given value. Available since: 2.0.0. Time complexity:
(dbsize)
DBSIZE
Return the number of keys in the selected database.
Available since: 1.0.0.
Time complexity:
DBSIZE Return the number of keys in the selected database. Available since: 1.0.0. Time complexity:
(debug-object key)
DEBUG OBJECT key
Get debugging information about a key.
Available since: 1.0.0.
Time complexity:
DEBUG OBJECT key Get debugging information about a key. Available since: 1.0.0. Time complexity:
(debug-segfault)
DEBUG SEGFAULT
Make the server crash.
Available since: 1.0.0.
Time complexity:
DEBUG SEGFAULT Make the server crash. Available since: 1.0.0. Time complexity:
(decr key)
DECR key
Decrement the integer value of a key by one.
Available since: 1.0.0.
Time complexity: O(1)
DECR key Decrement the integer value of a key by one. Available since: 1.0.0. Time complexity: O(1)
(decrby key decrement)
DECRBY key decrement
Decrement the integer value of a key by the given number.
Available since: 1.0.0.
Time complexity: O(1)
DECRBY key decrement Decrement the integer value of a key by the given number. Available since: 1.0.0. Time complexity: O(1)
(del key & args)
DEL key [key ...]
Delete a key.
Available since: 1.0.0.
Time complexity: O(N) where N is the number of keys that will be removed. When a key to remove holds a value other than a string, the individual complexity for this key is O(M) where M is the number of elements in the list, set, sorted set or hash. Removing a single key that holds a string value is O(1).
DEL key [key ...] Delete a key. Available since: 1.0.0. Time complexity: O(N) where N is the number of keys that will be removed. When a key to remove holds a value other than a string, the individual complexity for this key is O(M) where M is the number of elements in the list, set, sorted set or hash. Removing a single key that holds a string value is O(1).
(discard)
DISCARD
Discard all commands issued after MULTI.
Available since: 2.0.0.
Time complexity:
DISCARD Discard all commands issued after MULTI. Available since: 2.0.0. Time complexity:
(dump key)
DUMP key
Return a serialized version of the value stored at the specified key..
Available since: 2.6.0.
Time complexity: O(1) to access the key and additional O(NM) to serialized it, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1M) where M is small, so simply O(1).
DUMP key Return a serialized version of the value stored at the specified key.. Available since: 2.6.0. Time complexity: O(1) to access the key and additional O(N*M) to serialized it, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1).
(echo message)
ECHO message
Echo the given string.
Available since: 1.0.0.
Time complexity:
ECHO message Echo the given string. Available since: 1.0.0. Time complexity:
(eval script numkeys key & args)
EVAL script numkeys key [key ...] arg [arg ...]
Execute a Lua script server side.
Available since: 2.6.0.
Time complexity: Depends on the script that is executed.
EVAL script numkeys key [key ...] arg [arg ...] Execute a Lua script server side. Available since: 2.6.0. Time complexity: Depends on the script that is executed.
(eval* script numkeys key & args)
Optimistically tries to send 'evalsha' command for given script. In the event of a "NOSCRIPT" reply, reattempts with 'eval'. Returns the final command's reply.
Optimistically tries to send 'evalsha' command for given script. In the event of a "NOSCRIPT" reply, reattempts with 'eval'. Returns the final command's reply.
(evalsha sha1 numkeys key & args)
EVALSHA sha1 numkeys key [key ...] arg [arg ...]
Execute a Lua script server side.
Available since: 2.6.0.
Time complexity: Depends on the script that is executed.
EVALSHA sha1 numkeys key [key ...] arg [arg ...] Execute a Lua script server side. Available since: 2.6.0. Time complexity: Depends on the script that is executed.
(evalsha* script numkeys key & args)
Like 'evalsha' but automatically computes SHA1 hash for script.
Like 'evalsha' but automatically computes SHA1 hash for script.
(exec)
EXEC
Execute all commands issued after MULTI.
Available since: 1.2.0.
Time complexity:
EXEC Execute all commands issued after MULTI. Available since: 1.2.0. Time complexity:
(exists key)
EXISTS key
Determine if a key exists.
Available since: 1.0.0.
Time complexity: O(1)
EXISTS key Determine if a key exists. Available since: 1.0.0. Time complexity: O(1)
(expire key seconds)
EXPIRE key seconds
Set a key's time to live in seconds.
Available since: 1.0.0.
Time complexity: O(1)
EXPIRE key seconds Set a key's time to live in seconds. Available since: 1.0.0. Time complexity: O(1)
(expireat key timestamp)
EXPIREAT key timestamp
Set the expiration for a key as a UNIX timestamp.
Available since: 1.2.0.
Time complexity: O(1)
EXPIREAT key timestamp Set the expiration for a key as a UNIX timestamp. Available since: 1.2.0. Time complexity: O(1)
(flushall)
FLUSHALL
Remove all keys from all databases.
Available since: 1.0.0.
Time complexity:
FLUSHALL Remove all keys from all databases. Available since: 1.0.0. Time complexity:
(flushdb)
FLUSHDB
Remove all keys from the current database.
Available since: 1.0.0.
Time complexity:
FLUSHDB Remove all keys from the current database. Available since: 1.0.0. Time complexity:
(get key)
GET key
Get the value of a key.
Available since: 1.0.0.
Time complexity: O(1)
GET key Get the value of a key. Available since: 1.0.0. Time complexity: O(1)
(getbit key offset)
GETBIT key offset
Returns the bit value at offset in the string value stored at key.
Available since: 2.2.0.
Time complexity: O(1)
GETBIT key offset Returns the bit value at offset in the string value stored at key. Available since: 2.2.0. Time complexity: O(1)
(getrange key start end)
GETRANGE key start end
Get a substring of the string stored at a key.
Available since: 2.4.0.
Time complexity: O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.
GETRANGE key start end Get a substring of the string stored at a key. Available since: 2.4.0. Time complexity: O(N) where N is the length of the returned string. The complexity is ultimately determined by the returned length, but because creating a substring from an existing string is very cheap, it can be considered O(1) for small strings.
(getset key value)
GETSET key value
Set the string value of a key and return its old value.
Available since: 1.0.0.
Time complexity: O(1)
GETSET key value Set the string value of a key and return its old value. Available since: 1.0.0. Time complexity: O(1)
(hdel key field & args)
HDEL key field [field ...]
Delete one or more hash fields.
Available since: 2.0.0.
Time complexity: O(N) where N is the number of fields to be removed.
HDEL key field [field ...] Delete one or more hash fields. Available since: 2.0.0. Time complexity: O(N) where N is the number of fields to be removed.
(hexists key field)
HEXISTS key field
Determine if a hash field exists.
Available since: 2.0.0.
Time complexity: O(1)
HEXISTS key field Determine if a hash field exists. Available since: 2.0.0. Time complexity: O(1)
(hget key field)
HGET key field
Get the value of a hash field.
Available since: 2.0.0.
Time complexity: O(1)
HGET key field Get the value of a hash field. Available since: 2.0.0. Time complexity: O(1)
(hgetall key)
HGETALL key
Get all the fields and values in a hash.
Available since: 2.0.0.
Time complexity: O(N) where N is the size of the hash.
HGETALL key Get all the fields and values in a hash. Available since: 2.0.0. Time complexity: O(N) where N is the size of the hash.
(hgetall* key)
Like 'hgetall' but automatically coerces reply into a hash-map.
Like 'hgetall' but automatically coerces reply into a hash-map.
(hincrby key field increment)
HINCRBY key field increment
Increment the integer value of a hash field by the given number.
Available since: 2.0.0.
Time complexity: O(1)
HINCRBY key field increment Increment the integer value of a hash field by the given number. Available since: 2.0.0. Time complexity: O(1)
(hincrbyfloat key field increment)
HINCRBYFLOAT key field increment
Increment the float value of a hash field by the given amount.
Available since: 2.6.0.
Time complexity: O(1)
HINCRBYFLOAT key field increment Increment the float value of a hash field by the given amount. Available since: 2.6.0. Time complexity: O(1)
(hkeys key)
HKEYS key
Get all the fields in a hash.
Available since: 2.0.0.
Time complexity: O(N) where N is the size of the hash.
HKEYS key Get all the fields in a hash. Available since: 2.0.0. Time complexity: O(N) where N is the size of the hash.
(hlen key)
HLEN key
Get the number of fields in a hash.
Available since: 2.0.0.
Time complexity: O(1)
HLEN key Get the number of fields in a hash. Available since: 2.0.0. Time complexity: O(1)
(hmget key field & args)
HMGET key field [field ...]
Get the values of all the given hash fields.
Available since: 2.0.0.
Time complexity: O(N) where N is the number of fields being requested.
HMGET key field [field ...] Get the values of all the given hash fields. Available since: 2.0.0. Time complexity: O(N) where N is the number of fields being requested.
(hmset key field value & args)
HMSET key ["field" "value"] [["field" "value"] ...]
Set multiple hash fields to multiple values.
Available since: 2.0.0.
Time complexity: O(N) where N is the number of fields being set.
HMSET key ["field" "value"] [["field" "value"] ...] Set multiple hash fields to multiple values. Available since: 2.0.0. Time complexity: O(N) where N is the number of fields being set.
(hset key field value)
HSET key field value
Set the string value of a hash field.
Available since: 2.0.0.
Time complexity: O(1)
HSET key field value Set the string value of a hash field. Available since: 2.0.0. Time complexity: O(1)
(hsetnx key field value)
HSETNX key field value
Set the value of a hash field, only if the field does not exist.
Available since: 2.0.0.
Time complexity: O(1)
HSETNX key field value Set the value of a hash field, only if the field does not exist. Available since: 2.0.0. Time complexity: O(1)
(hvals key)
HVALS key
Get all the values in a hash.
Available since: 2.0.0.
Time complexity: O(N) where N is the size of the hash.
HVALS key Get all the values in a hash. Available since: 2.0.0. Time complexity: O(N) where N is the size of the hash.
(incr key)
INCR key
Increment the integer value of a key by one.
Available since: 1.0.0.
Time complexity: O(1)
INCR key Increment the integer value of a key by one. Available since: 1.0.0. Time complexity: O(1)
(incrby key increment)
INCRBY key increment
Increment the integer value of a key by the given amount.
Available since: 1.0.0.
Time complexity: O(1)
INCRBY key increment Increment the integer value of a key by the given amount. Available since: 1.0.0. Time complexity: O(1)
(incrbyfloat key increment)
INCRBYFLOAT key increment
Increment the float value of a key by the given amount.
Available since: 2.6.0.
Time complexity: O(1)
INCRBYFLOAT key increment Increment the float value of a key by the given amount. Available since: 2.6.0. Time complexity: O(1)
(info)
INFO
Get information and statistics about the server.
Available since: 1.0.0.
Time complexity:
INFO Get information and statistics about the server. Available since: 1.0.0. Time complexity:
(info*)
Like 'info' but automatically coerces reply into a hash-map.
Like 'info' but automatically coerces reply into a hash-map.
(keys pattern)
KEYS pattern
Find all keys matching the given pattern.
Available since: 1.0.0.
Time complexity: O(N) with N being the number of keys in the database, under the assumption that the key names in the database and the given pattern have limited length.
KEYS pattern Find all keys matching the given pattern. Available since: 1.0.0. Time complexity: O(N) with N being the number of keys in the database, under the assumption that the key names in the database and the given pattern have limited length.
(lastsave)
LASTSAVE
Get the UNIX time stamp of the last successful save to disk.
Available since: 1.0.0.
Time complexity:
LASTSAVE Get the UNIX time stamp of the last successful save to disk. Available since: 1.0.0. Time complexity:
(lindex key index)
LINDEX key index
Get an element from a list by its index.
Available since: 1.0.0.
Time complexity: O(N) where N is the number of elements to traverse to get to the element at index. This makes asking for the first or the last element of the list O(1).
LINDEX key index Get an element from a list by its index. Available since: 1.0.0. Time complexity: O(N) where N is the number of elements to traverse to get to the element at index. This makes asking for the first or the last element of the list O(1).
(linsert key where pivot value)
LINSERT key BEFORE|AFTER pivot value
Insert an element before or after another element in a list.
Available since: 2.2.0.
Time complexity: O(N) where N is the number of elements to traverse before seeing the value pivot. This means that inserting somewhere on the left end on the list (head) can be considered O(1) and inserting somewhere on the right end (tail) is O(N).
LINSERT key BEFORE|AFTER pivot value Insert an element before or after another element in a list. Available since: 2.2.0. Time complexity: O(N) where N is the number of elements to traverse before seeing the value pivot. This means that inserting somewhere on the left end on the list (head) can be considered O(1) and inserting somewhere on the right end (tail) is O(N).
(llen key)
LLEN key
Get the length of a list.
Available since: 1.0.0.
Time complexity: O(1)
LLEN key Get the length of a list. Available since: 1.0.0. Time complexity: O(1)
(lpop key)
LPOP key
Remove and get the first element in a list.
Available since: 1.0.0.
Time complexity: O(1)
LPOP key Remove and get the first element in a list. Available since: 1.0.0. Time complexity: O(1)
(lpush key value & args)
LPUSH key value [value ...]
Prepend one or multiple values to a list.
Available since: 1.0.0.
Time complexity: O(1)
LPUSH key value [value ...] Prepend one or multiple values to a list. Available since: 1.0.0. Time complexity: O(1)
(lpushx key value)
LPUSHX key value
Prepend a value to a list, only if the list exists.
Available since: 2.2.0.
Time complexity: O(1)
LPUSHX key value Prepend a value to a list, only if the list exists. Available since: 2.2.0. Time complexity: O(1)
(lrange key start stop)
LRANGE key start stop
Get a range of elements from a list.
Available since: 1.0.0.
Time complexity: O(S+N) where S is the start offset and N is the number of elements in the specified range.
LRANGE key start stop Get a range of elements from a list. Available since: 1.0.0. Time complexity: O(S+N) where S is the start offset and N is the number of elements in the specified range.
(lrem key count value)
LREM key count value
Remove elements from a list.
Available since: 1.0.0.
Time complexity: O(N) where N is the length of the list.
LREM key count value Remove elements from a list. Available since: 1.0.0. Time complexity: O(N) where N is the length of the list.
(lset key index value)
LSET key index value
Set the value of an element in a list by its index.
Available since: 1.0.0.
Time complexity: O(N) where N is the length of the list. Setting either the first or the last element of the list is O(1).
LSET key index value Set the value of an element in a list by its index. Available since: 1.0.0. Time complexity: O(N) where N is the length of the list. Setting either the first or the last element of the list is O(1).
(ltrim key start stop)
LTRIM key start stop
Trim a list to the specified range.
Available since: 1.0.0.
Time complexity: O(N) where N is the number of elements to be removed by the operation.
LTRIM key start stop Trim a list to the specified range. Available since: 1.0.0. Time complexity: O(N) where N is the number of elements to be removed by the operation.
(make-conn-pool & options)
For option documentation see http://commons.apache.org/pool/apidocs/org/apache/commons/pool/impl/GenericKeyedObjectPool.html
For option documentation see http://commons.apache.org/pool/apidocs/org/apache/commons/pool/impl/GenericKeyedObjectPool.html
(make-conn-spec &
{:keys [host port password timeout db]
:or {host "127.0.0.1" port 6379 password nil timeout 0 db 0}})
(mget key & args)
MGET key [key ...]
Get the values of all the given keys.
Available since: 1.0.0.
Time complexity: O(N) where N is the number of keys to retrieve.
MGET key [key ...] Get the values of all the given keys. Available since: 1.0.0. Time complexity: O(N) where N is the number of keys to retrieve.
(migrate host port key destination-db timeout)
MIGRATE host port key destination-db timeout
Atomically transfer a key from a Redis instance to another one..
Available since: 2.6.0.
Time complexity: This command actually executes a DUMP+DEL in the source instance, and a RESTORE in the target instance. See the pages of these commands for time complexity. Also an O(N) data transfer between the two instances is performed.
MIGRATE host port key destination-db timeout Atomically transfer a key from a Redis instance to another one.. Available since: 2.6.0. Time complexity: This command actually executes a DUMP+DEL in the source instance, and a RESTORE in the target instance. See the pages of these commands for time complexity. Also an O(N) data transfer between the two instances is performed.
(monitor)
MONITOR
Listen for all requests received by the server in real time.
Available since: 1.0.0.
Time complexity:
MONITOR Listen for all requests received by the server in real time. Available since: 1.0.0. Time complexity:
(move key db)
MOVE key db
Move a key to another database.
Available since: 1.0.0.
Time complexity: O(1)
MOVE key db Move a key to another database. Available since: 1.0.0. Time complexity: O(1)
(mset key value & args)
MSET ["key" "value"] [["key" "value"] ...]
Set multiple keys to multiple values.
Available since: 1.0.1.
Time complexity: O(N) where N is the number of keys to set.
MSET ["key" "value"] [["key" "value"] ...] Set multiple keys to multiple values. Available since: 1.0.1. Time complexity: O(N) where N is the number of keys to set.
(msetnx key value & args)
MSETNX ["key" "value"] [["key" "value"] ...]
Set multiple keys to multiple values, only if none of the keys exist.
Available since: 1.0.1.
Time complexity: O(N) where N is the number of keys to set.
MSETNX ["key" "value"] [["key" "value"] ...] Set multiple keys to multiple values, only if none of the keys exist. Available since: 1.0.1. Time complexity: O(N) where N is the number of keys to set.
(multi)
MULTI
Mark the start of a transaction block.
Available since: 1.2.0.
Time complexity:
MULTI Mark the start of a transaction block. Available since: 1.2.0. Time complexity:
(object subcommand & args)
OBJECT subcommand [arguments [arguments ...]]
Inspect the internals of Redis objects.
Available since: 2.2.3.
Time complexity: O(1) for all the currently implemented subcommands.
OBJECT subcommand [arguments [arguments ...]] Inspect the internals of Redis objects. Available since: 2.2.3. Time complexity: O(1) for all the currently implemented subcommands.
(persist key)
PERSIST key
Remove the expiration from a key.
Available since: 2.2.0.
Time complexity: O(1)
PERSIST key Remove the expiration from a key. Available since: 2.2.0. Time complexity: O(1)
(pexpire key milliseconds)
PEXPIRE key milliseconds
Set a key's time to live in milliseconds.
Available since: 2.6.0.
Time complexity: O(1)
PEXPIRE key milliseconds Set a key's time to live in milliseconds. Available since: 2.6.0. Time complexity: O(1)
(pexpireat key milliseconds-timestamp)
PEXPIREAT key milliseconds-timestamp
Set the expiration for a key as a UNIX timestamp specified in milliseconds.
Available since: 2.6.0.
Time complexity: O(1)
PEXPIREAT key milliseconds-timestamp Set the expiration for a key as a UNIX timestamp specified in milliseconds. Available since: 2.6.0. Time complexity: O(1)
(ping)
PING
Ping the server.
Available since: 1.0.0.
Time complexity:
PING Ping the server. Available since: 1.0.0. Time complexity:
(psetex key milliseconds value)
PSETEX key milliseconds value
Set the value and expiration in milliseconds of a key.
Available since: 2.6.0.
Time complexity: O(1)
PSETEX key milliseconds value Set the value and expiration in milliseconds of a key. Available since: 2.6.0. Time complexity: O(1)
(psubscribe pattern & args)
PSUBSCRIBE pattern [pattern ...]
Listen for messages published to channels matching the given patterns.
Available since: 2.0.0.
Time complexity: O(N) where N is the number of patterns the client is already subscribed to.
PSUBSCRIBE pattern [pattern ...] Listen for messages published to channels matching the given patterns. Available since: 2.0.0. Time complexity: O(N) where N is the number of patterns the client is already subscribed to.
(pttl key)
PTTL key
Get the time to live for a key in milliseconds.
Available since: 2.6.0.
Time complexity: O(1)
PTTL key Get the time to live for a key in milliseconds. Available since: 2.6.0. Time complexity: O(1)
(publish channel message)
PUBLISH channel message
Post a message to a channel.
Available since: 2.0.0.
Time complexity: O(N+M) where N is the number of clients subscribed to the receiving channel and M is the total number of subscribed patterns (by any client).
PUBLISH channel message Post a message to a channel. Available since: 2.0.0. Time complexity: O(N+M) where N is the number of clients subscribed to the receiving channel and M is the total number of subscribed patterns (by any client).
(punsubscribe & args)
PUNSUBSCRIBE [pattern [pattern ...]]
Stop listening for messages posted to channels matching the given patterns.
Available since: 2.0.0.
Time complexity: O(N+M) where N is the number of patterns the client is already subscribed and M is the number of total patterns subscribed in the system (by any client).
PUNSUBSCRIBE [pattern [pattern ...]] Stop listening for messages posted to channels matching the given patterns. Available since: 2.0.0. Time complexity: O(N+M) where N is the number of patterns the client is already subscribed and M is the number of total patterns subscribed in the system (by any client).
(quit)
QUIT
Close the connection.
Available since: 1.0.0.
Time complexity:
QUIT Close the connection. Available since: 1.0.0. Time complexity:
(randomkey)
RANDOMKEY
Return a random key from the keyspace.
Available since: 1.0.0.
Time complexity: O(1)
RANDOMKEY Return a random key from the keyspace. Available since: 1.0.0. Time complexity: O(1)
(remember value)
Special command that takes any value and returns it unchanged as part of an enclosing 'with-conn' pipeline response.
Special command that takes any value and returns it unchanged as part of an enclosing 'with-conn' pipeline response.
(rename key newkey)
RENAME key newkey
Rename a key.
Available since: 1.0.0.
Time complexity: O(1)
RENAME key newkey Rename a key. Available since: 1.0.0. Time complexity: O(1)
(renamenx key newkey)
RENAMENX key newkey
Rename a key, only if the new key does not exist.
Available since: 1.0.0.
Time complexity: O(1)
RENAMENX key newkey Rename a key, only if the new key does not exist. Available since: 1.0.0. Time complexity: O(1)
(restore key ttl serialized-value)
RESTORE key ttl serialized-value
Create a key using the provided serialized value, previously obtained using DUMP..
Available since: 2.6.0.
Time complexity: O(1) to create the new key and additional O(NM) to recostruct the serialized value, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1M) where M is small, so simply O(1). However for sorted set values the complexity is O(NMlog(N)) because inserting values into sorted sets is O(log(N)).
RESTORE key ttl serialized-value Create a key using the provided serialized value, previously obtained using DUMP.. Available since: 2.6.0. Time complexity: O(1) to create the new key and additional O(N*M) to recostruct the serialized value, where N is the number of Redis objects composing the value and M their average size. For small string values the time complexity is thus O(1)+O(1*M) where M is small, so simply O(1). However for sorted set values the complexity is O(N*M*log(N)) because inserting values into sorted sets is O(log(N)).
(rpop key)
RPOP key
Remove and get the last element in a list.
Available since: 1.0.0.
Time complexity: O(1)
RPOP key Remove and get the last element in a list. Available since: 1.0.0. Time complexity: O(1)
(rpoplpush source destination)
RPOPLPUSH source destination
Remove the last element in a list, append it to another list and return it.
Available since: 1.2.0.
Time complexity: O(1)
RPOPLPUSH source destination Remove the last element in a list, append it to another list and return it. Available since: 1.2.0. Time complexity: O(1)
(rpush key value & args)
RPUSH key value [value ...]
Append one or multiple values to a list.
Available since: 1.0.0.
Time complexity: O(1)
RPUSH key value [value ...] Append one or multiple values to a list. Available since: 1.0.0. Time complexity: O(1)
(rpushx key value)
RPUSHX key value
Append a value to a list, only if the list exists.
Available since: 2.2.0.
Time complexity: O(1)
RPUSHX key value Append a value to a list, only if the list exists. Available since: 2.2.0. Time complexity: O(1)
(sadd key member & args)
SADD key member [member ...]
Add one or more members to a set.
Available since: 1.0.0.
Time complexity: O(N) where N is the number of members to be added.
SADD key member [member ...] Add one or more members to a set. Available since: 1.0.0. Time complexity: O(N) where N is the number of members to be added.
(save)
SAVE
Synchronously save the dataset to disk.
Available since: 1.0.0.
Time complexity:
SAVE Synchronously save the dataset to disk. Available since: 1.0.0. Time complexity:
(scard key)
SCARD key
Get the number of members in a set.
Available since: 1.0.0.
Time complexity: O(1)
SCARD key Get the number of members in a set. Available since: 1.0.0. Time complexity: O(1)
(script-exists script & args)
SCRIPT EXISTS script [script ...]
Check existence of scripts in the script cache..
Available since: 2.6.0.
Time complexity: O(N) with N being the number of scripts to check (so checking a single script is an O(1) operation).
SCRIPT EXISTS script [script ...] Check existence of scripts in the script cache.. Available since: 2.6.0. Time complexity: O(N) with N being the number of scripts to check (so checking a single script is an O(1) operation).
(script-flush)
SCRIPT FLUSH
Remove all the scripts from the script cache..
Available since: 2.6.0.
Time complexity: O(N) with N being the number of scripts in cache
SCRIPT FLUSH Remove all the scripts from the script cache.. Available since: 2.6.0. Time complexity: O(N) with N being the number of scripts in cache
(script-kill)
SCRIPT KILL
Kill the script currently in execution..
Available since: 2.6.0.
Time complexity: O(1)
SCRIPT KILL Kill the script currently in execution.. Available since: 2.6.0. Time complexity: O(1)
(script-load script)
SCRIPT LOAD script
Load the specified Lua script into the script cache..
Available since: 2.6.0.
Time complexity: O(N) with N being the length in bytes of the script body.
SCRIPT LOAD script Load the specified Lua script into the script cache.. Available since: 2.6.0. Time complexity: O(N) with N being the length in bytes of the script body.
(sdiff key & args)
SDIFF key [key ...]
Subtract multiple sets.
Available since: 1.0.0.
Time complexity: O(N) where N is the total number of elements in all given sets.
SDIFF key [key ...] Subtract multiple sets. Available since: 1.0.0. Time complexity: O(N) where N is the total number of elements in all given sets.
(sdiffstore destination key & args)
SDIFFSTORE destination key [key ...]
Subtract multiple sets and store the resulting set in a key.
Available since: 1.0.0.
Time complexity: O(N) where N is the total number of elements in all given sets.
SDIFFSTORE destination key [key ...] Subtract multiple sets and store the resulting set in a key. Available since: 1.0.0. Time complexity: O(N) where N is the total number of elements in all given sets.
(select index)
SELECT index
Change the selected database for the current connection.
Available since: 1.0.0.
Time complexity:
SELECT index Change the selected database for the current connection. Available since: 1.0.0. Time complexity:
(set key value)
SET key value
Set the string value of a key.
Available since: 1.0.0.
Time complexity: O(1)
SET key value Set the string value of a key. Available since: 1.0.0. Time complexity: O(1)
(setbit key offset value)
SETBIT key offset value
Sets or clears the bit at offset in the string value stored at key.
Available since: 2.2.0.
Time complexity: O(1)
SETBIT key offset value Sets or clears the bit at offset in the string value stored at key. Available since: 2.2.0. Time complexity: O(1)
(setex key seconds value)
SETEX key seconds value
Set the value and expiration of a key.
Available since: 2.0.0.
Time complexity: O(1)
SETEX key seconds value Set the value and expiration of a key. Available since: 2.0.0. Time complexity: O(1)
(setnx key value)
SETNX key value
Set the value of a key, only if the key does not exist.
Available since: 1.0.0.
Time complexity: O(1)
SETNX key value Set the value of a key, only if the key does not exist. Available since: 1.0.0. Time complexity: O(1)
(setrange key offset value)
SETRANGE key offset value
Overwrite part of a string at key starting at the specified offset.
Available since: 2.2.0.
Time complexity: O(1), not counting the time taken to copy the new string in place. Usually, this string is very small so the amortized complexity is O(1). Otherwise, complexity is O(M) with M being the length of the value argument.
SETRANGE key offset value Overwrite part of a string at key starting at the specified offset. Available since: 2.2.0. Time complexity: O(1), not counting the time taken to copy the new string in place. Usually, this string is very small so the amortized complexity is O(1). Otherwise, complexity is O(M) with M being the length of the value argument.
(shutdown & args)
SHUTDOWN [NOSAVE] [SAVE]
Synchronously save the dataset to disk and then shut down the server.
Available since: 1.0.0.
Time complexity:
SHUTDOWN [NOSAVE] [SAVE] Synchronously save the dataset to disk and then shut down the server. Available since: 1.0.0. Time complexity:
(sinter key & args)
SINTER key [key ...]
Intersect multiple sets.
Available since: 1.0.0.
Time complexity: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.
SINTER key [key ...] Intersect multiple sets. Available since: 1.0.0. Time complexity: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.
(sinterstore destination key & args)
SINTERSTORE destination key [key ...]
Intersect multiple sets and store the resulting set in a key.
Available since: 1.0.0.
Time complexity: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.
SINTERSTORE destination key [key ...] Intersect multiple sets and store the resulting set in a key. Available since: 1.0.0. Time complexity: O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.
(sismember key member)
SISMEMBER key member
Determine if a given value is a member of a set.
Available since: 1.0.0.
Time complexity: O(1)
SISMEMBER key member Determine if a given value is a member of a set. Available since: 1.0.0. Time complexity: O(1)
(slaveof host port)
SLAVEOF host port
Make the server a slave of another instance, or promote it as master.
Available since: 1.0.0.
Time complexity:
SLAVEOF host port Make the server a slave of another instance, or promote it as master. Available since: 1.0.0. Time complexity:
(slowlog subcommand & args)
SLOWLOG subcommand [argument]
Manages the Redis slow queries log.
Available since: 2.2.12.
Time complexity:
SLOWLOG subcommand [argument] Manages the Redis slow queries log. Available since: 2.2.12. Time complexity:
(smembers key)
SMEMBERS key
Get all the members in a set.
Available since: 1.0.0.
Time complexity: O(N) where N is the set cardinality.
SMEMBERS key Get all the members in a set. Available since: 1.0.0. Time complexity: O(N) where N is the set cardinality.
(smove source destination member)
SMOVE source destination member
Move a member from one set to another.
Available since: 1.0.0.
Time complexity: O(1)
SMOVE source destination member Move a member from one set to another. Available since: 1.0.0. Time complexity: O(1)
(sort key & args)
SORT key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA] [STORE destination]
Sort the elements in a list, set or sorted set.
Available since: 1.0.0.
Time complexity: O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is currently O(N) as there is a copy step that will be avoided in next releases.
SORT key [BY pattern] [LIMIT offset count] [GET pattern [GET pattern ...]] [ASC|DESC] [ALPHA] [STORE destination] Sort the elements in a list, set or sorted set. Available since: 1.0.0. Time complexity: O(N+M*log(M)) where N is the number of elements in the list or set to sort, and M the number of returned elements. When the elements are not sorted, complexity is currently O(N) as there is a copy step that will be avoided in next releases.
(sort* key & sort-args)
Like 'sort' but supports idiomatic Clojure arguments: :by pattern, :limit offset count, :get pattern, :mget patterns, :store destination, :alpha, :asc, :desc.
Like 'sort' but supports idiomatic Clojure arguments: :by pattern, :limit offset count, :get pattern, :mget patterns, :store destination, :alpha, :asc, :desc.
(spop key)
SPOP key
Remove and return a random member from a set.
Available since: 1.0.0.
Time complexity: O(1)
SPOP key Remove and return a random member from a set. Available since: 1.0.0. Time complexity: O(1)
(srandmember key)
SRANDMEMBER key
Get a random member from a set.
Available since: 1.0.0.
Time complexity: O(1)
SRANDMEMBER key Get a random member from a set. Available since: 1.0.0. Time complexity: O(1)
(srem key member & args)
SREM key member [member ...]
Remove one or more members from a set.
Available since: 1.0.0.
Time complexity: O(N) where N is the number of members to be removed.
SREM key member [member ...] Remove one or more members from a set. Available since: 1.0.0. Time complexity: O(N) where N is the number of members to be removed.
(strlen key)
STRLEN key
Get the length of the value stored in a key.
Available since: 2.2.0.
Time complexity: O(1)
STRLEN key Get the length of the value stored in a key. Available since: 2.2.0. Time complexity: O(1)
(subscribe channel & args)
SUBSCRIBE channel [channel ...]
Listen for messages published to the given channels.
Available since: 2.0.0.
Time complexity: O(N) where N is the number of channels to subscribe to.
SUBSCRIBE channel [channel ...] Listen for messages published to the given channels. Available since: 2.0.0. Time complexity: O(N) where N is the number of channels to subscribe to.
(sunion key & args)
SUNION key [key ...]
Add multiple sets.
Available since: 1.0.0.
Time complexity: O(N) where N is the total number of elements in all given sets.
SUNION key [key ...] Add multiple sets. Available since: 1.0.0. Time complexity: O(N) where N is the total number of elements in all given sets.
(sunionstore destination key & args)
SUNIONSTORE destination key [key ...]
Add multiple sets and store the resulting set in a key.
Available since: 1.0.0.
Time complexity: O(N) where N is the total number of elements in all given sets.
SUNIONSTORE destination key [key ...] Add multiple sets and store the resulting set in a key. Available since: 1.0.0. Time complexity: O(N) where N is the total number of elements in all given sets.
(sync)
SYNC
Internal command used for replication.
Available since: 1.0.0.
Time complexity:
SYNC Internal command used for replication. Available since: 1.0.0. Time complexity:
(time)
TIME
Return the current server time.
Available since: 2.6.0.
Time complexity:
TIME Return the current server time. Available since: 2.6.0. Time complexity:
(ttl key)
TTL key
Get the time to live for a key.
Available since: 1.0.0.
Time complexity: O(1)
TTL key Get the time to live for a key. Available since: 1.0.0. Time complexity: O(1)
(type key)
TYPE key
Determine the type stored at key.
Available since: 1.0.0.
Time complexity: O(1)
TYPE key Determine the type stored at key. Available since: 1.0.0. Time complexity: O(1)
(unsubscribe & args)
UNSUBSCRIBE [channel [channel ...]]
Stop listening for messages posted to the given channels.
Available since: 2.0.0.
Time complexity: O(N) where N is the number of clients already subscribed to a channel.
UNSUBSCRIBE [channel [channel ...]] Stop listening for messages posted to the given channels. Available since: 2.0.0. Time complexity: O(N) where N is the number of clients already subscribed to a channel.
(unwatch)
UNWATCH
Forget about all watched keys.
Available since: 2.2.0.
Time complexity: O(1)
UNWATCH Forget about all watched keys. Available since: 2.2.0. Time complexity: O(1)
(watch key & args)
WATCH key [key ...]
Watch the given keys to determine execution of the MULTI/EXEC block.
Available since: 2.2.0.
Time complexity: O(1) for every key.
WATCH key [key ...] Watch the given keys to determine execution of the MULTI/EXEC block. Available since: 2.2.0. Time complexity: O(1) for every key.
(with-conn connection-pool connection-spec & body)
Evaluates body in the context of a thread-bound pooled connection to a Redis server. Sends Redis commands to server as pipeline and returns the server's response. Releases connection back to pool when done.
Use 'make-conn-pool' and 'make-conn-spec' to generate the required arguments.
Evaluates body in the context of a thread-bound pooled connection to a Redis server. Sends Redis commands to server as pipeline and returns the server's response. Releases connection back to pool when done. Use 'make-conn-pool' and 'make-conn-spec' to generate the required arguments.
(with-new-listener connection-spec handler initial-state & body)
Creates a persistent connection to Redis server and a thread to listen for server messages on that connection.
Incoming messages will be dispatched (along with current listener state) to binary handler function.
Evaluates body within the context of the connection and returns a general-purpose Listener containing:
1. The underlying persistent connection to facilitate 'close-listener' and
'with-open-listener'.
2. An atom containing the function given to handle incoming server
messages.
3. An atom containing any other optional listener state.
Useful for pub/sub, monitoring, etc.
Creates a persistent connection to Redis server and a thread to listen for server messages on that connection. Incoming messages will be dispatched (along with current listener state) to binary handler function. Evaluates body within the context of the connection and returns a general-purpose Listener containing: 1. The underlying persistent connection to facilitate 'close-listener' and 'with-open-listener'. 2. An atom containing the function given to handle incoming server messages. 3. An atom containing any other optional listener state. Useful for pub/sub, monitoring, etc.
(with-new-pubsub-listener connection-spec
message-handlers
&
subscription-commands)
A wrapper for 'with-new-listener'. Creates a persistent connection to Redis server and a thread to listen for published messages from channels that we'll subscribe to using 'p/subscribe' commands in body.
While listening, incoming messages will be dispatched by source (channel or pattern) to the given message-handler functions:
{"channel1" (fn [message] (prn "Channel match: " message))
"user*" (fn [message] (prn "Pattern match: " message))}
SUBSCRIBE message: ["message" channel payload]
PSUBSCRIBE message: ["pmessage" pattern matching-channel payload]
Returns the Listener to allow manual closing and adjustments to message-handlers.
A wrapper for 'with-new-listener'. Creates a persistent connection to Redis server and a thread to listen for published messages from channels that we'll subscribe to using 'p/subscribe' commands in body. While listening, incoming messages will be dispatched by source (channel or pattern) to the given message-handler functions: {"channel1" (fn [message] (prn "Channel match: " message)) "user*" (fn [message] (prn "Pattern match: " message))} SUBSCRIBE message: `["message" channel payload]` PSUBSCRIBE message: `["pmessage" pattern matching-channel payload]` Returns the Listener to allow manual closing and adjustments to message-handlers.
(with-open-listener listener & body)
Evaluates body within the context of given listener's preexisting persistent connection.
Evaluates body within the context of given listener's preexisting persistent connection.
(with-parser parser-fn & body)
Wraps body so that replies to any wrapped Redis commands will be parsed with (parser-fn reply).
Wraps body so that replies to any wrapped Redis commands will be parsed with (parser-fn reply).
(zadd key score member & args)
ZADD key score member [score] [member]
Add one or more members to a sorted set, or update its score if it already exists.
Available since: 1.2.0.
Time complexity: O(log(N)) where N is the number of elements in the sorted set.
ZADD key score member [score] [member] Add one or more members to a sorted set, or update its score if it already exists. Available since: 1.2.0. Time complexity: O(log(N)) where N is the number of elements in the sorted set.
(zcard key)
ZCARD key
Get the number of members in a sorted set.
Available since: 1.2.0.
Time complexity: O(1)
ZCARD key Get the number of members in a sorted set. Available since: 1.2.0. Time complexity: O(1)
(zcount key min max)
ZCOUNT key min max
Count the members in a sorted set with scores within the given values.
Available since: 2.0.0.
Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M being the number of elements between min and max.
ZCOUNT key min max Count the members in a sorted set with scores within the given values. Available since: 2.0.0. Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M being the number of elements between min and max.
(zincrby key increment member)
ZINCRBY key increment member
Increment the score of a member in a sorted set.
Available since: 1.2.0.
Time complexity: O(log(N)) where N is the number of elements in the sorted set.
ZINCRBY key increment member Increment the score of a member in a sorted set. Available since: 1.2.0. Time complexity: O(log(N)) where N is the number of elements in the sorted set.
(zinterstore destination numkeys key & args)
ZINTERSTORE destination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX]
Intersect multiple sorted sets and store the resulting sorted set in a new key.
Available since: 2.0.0.
Time complexity: O(NK)+O(Mlog(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.
ZINTERSTORE destination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX] Intersect multiple sorted sets and store the resulting sorted set in a new key. Available since: 2.0.0. Time complexity: O(N*K)+O(M*log(M)) worst case with N being the smallest input sorted set, K being the number of input sorted sets and M being the number of elements in the resulting sorted set.
(zinterstore* dest-key source-keys & options)
Like 'zinterstore' but automatically counts keys.
Like 'zinterstore' but automatically counts keys.
(zrange key start stop & args)
ZRANGE key start stop [WITHSCORES]
Return a range of members in a sorted set, by index.
Available since: 1.2.0.
Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
ZRANGE key start stop [WITHSCORES] Return a range of members in a sorted set, by index. Available since: 1.2.0. Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
(zrangebyscore key min max & args)
ZRANGEBYSCORE key min max [WITHSCORES] [LIMIT offset count]
Return a range of members in a sorted set, by score.
Available since: 1.0.5.
Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).
ZRANGEBYSCORE key min max [WITHSCORES] [LIMIT offset count] Return a range of members in a sorted set, by score. Available since: 1.0.5. Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).
(zrank key member)
ZRANK key member
Determine the index of a member in a sorted set.
Available since: 2.0.0.
Time complexity: O(log(N))
ZRANK key member Determine the index of a member in a sorted set. Available since: 2.0.0. Time complexity: O(log(N))
(zrem key member & args)
ZREM key member [member ...]
Remove one or more members from a sorted set.
Available since: 1.2.0.
Time complexity: O(M*log(N)) with N being the number of elements in the sorted set and M the number of elements to be removed.
ZREM key member [member ...] Remove one or more members from a sorted set. Available since: 1.2.0. Time complexity: O(M*log(N)) with N being the number of elements in the sorted set and M the number of elements to be removed.
(zremrangebyrank key start stop)
ZREMRANGEBYRANK key start stop
Remove all members in a sorted set within the given indexes.
Available since: 2.0.0.
Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
ZREMRANGEBYRANK key start stop Remove all members in a sorted set within the given indexes. Available since: 2.0.0. Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
(zremrangebyscore key min max)
ZREMRANGEBYSCORE key min max
Remove all members in a sorted set within the given scores.
Available since: 1.2.0.
Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
ZREMRANGEBYSCORE key min max Remove all members in a sorted set within the given scores. Available since: 1.2.0. Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements removed by the operation.
(zrevrange key start stop & args)
ZREVRANGE key start stop [WITHSCORES]
Return a range of members in a sorted set, by index, with scores ordered from high to low.
Available since: 1.2.0.
Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
ZREVRANGE key start stop [WITHSCORES] Return a range of members in a sorted set, by index, with scores ordered from high to low. Available since: 1.2.0. Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.
(zrevrangebyscore key max min & args)
ZREVRANGEBYSCORE key max min [WITHSCORES] [LIMIT offset count]
Return a range of members in a sorted set, by score, with scores ordered from high to low.
Available since: 2.2.0.
Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).
ZREVRANGEBYSCORE key max min [WITHSCORES] [LIMIT offset count] Return a range of members in a sorted set, by score, with scores ordered from high to low. Available since: 2.2.0. Time complexity: O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements being returned. If M is constant (e.g. always asking for the first 10 elements with LIMIT), you can consider it O(log(N)).
(zrevrank key member)
ZREVRANK key member
Determine the index of a member in a sorted set, with scores ordered from high to low.
Available since: 2.0.0.
Time complexity: O(log(N))
ZREVRANK key member Determine the index of a member in a sorted set, with scores ordered from high to low. Available since: 2.0.0. Time complexity: O(log(N))
(zscore key member)
ZSCORE key member
Get the score associated with the given member in a sorted set.
Available since: 1.2.0.
Time complexity: O(1)
ZSCORE key member Get the score associated with the given member in a sorted set. Available since: 1.2.0. Time complexity: O(1)
(zunionstore destination numkeys key & args)
ZUNIONSTORE destination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX]
Add multiple sorted sets and store the resulting sorted set in a new key.
Available since: 2.0.0.
Time complexity: O(N)+O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.
ZUNIONSTORE destination numkeys key [key ...] [WEIGHTS weight] [AGGREGATE SUM|MIN|MAX] Add multiple sorted sets and store the resulting sorted set in a new key. Available since: 2.0.0. Time complexity: O(N)+O(M log(M)) with N being the sum of the sizes of the input sorted sets, and M being the number of elements in the resulting sorted set.
(zunionstore* dest-key source-keys & options)
Like 'zunionstore' but automatically counts keys.
Like 'zunionstore' but automatically counts keys.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close