{ "ACL": { "summary": "A container for Access List Control commands.", "since": "6.0.0", "group": "server", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "ACL CAT": { "summary": "Lists the ACL categories, or the commands inside a category.", "since": "6.0.0", "group": "server", "complexity": "O(1) since the categories and commands are a fixed set.", "acl_categories": [ "@slow" ], "arity": -2, "arguments": [ { "name": "category", "type": "string", "display_text": "category", "optional": true } ], "command_flags": [ "noscript", "loading", "stale" ] }, "ACL DELUSER": { "summary": "Deletes ACL users, and terminates their connections.", "since": "6.0.0", "group": "server", "complexity": "O(1) amortized time considering the typical user.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -3, "arguments": [ { "name": "username", "type": "string", "display_text": "username", "multiple": true } ], "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:all_succeeded" ] }, "ACL DRYRUN": { "summary": "Simulates the execution of a command by a user, without executing the command.", "since": "7.0.0", "group": "server", "complexity": "O(1).", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -4, "arguments": [ { "name": "username", "type": "string", "display_text": "username" }, { "name": "command", "type": "string", "display_text": "command" }, { "name": "arg", "type": "string", "display_text": "arg", "optional": true, "multiple": true } ], "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "ACL GENPASS": { "summary": "Generates a pseudorandom, secure password that can be used to identify ACL users.", "since": "6.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": -2, "arguments": [ { "name": "bits", "type": "integer", "display_text": "bits", "optional": true } ], "command_flags": [ "noscript", "loading", "stale" ] }, "ACL GETUSER": { "summary": "Lists the ACL rules of a user.", "since": "6.0.0", "group": "server", "complexity": "O(N). Where N is the number of password, command and pattern rules that the user has.", "history": [ [ "6.2.0", "Added Pub/Sub channel patterns." ], [ "7.0.0", "Added selectors and changed the format of key and channel patterns from a list to their rule representation." ] ], "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "username", "type": "string", "display_text": "username" } ], "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "ACL HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "6.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "ACL LIST": { "summary": "Dumps the effective rules in ACL file format.", "since": "6.0.0", "group": "server", "complexity": "O(N). Where N is the number of configured users.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "ACL LOAD": { "summary": "Reloads the rules from the configured ACL file.", "since": "6.0.0", "group": "server", "complexity": "O(N). Where N is the number of configured users.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "ACL LOG": { "summary": "Lists recent security events generated due to ACL rules.", "since": "6.0.0", "group": "server", "complexity": "O(N) with N being the number of entries shown.", "history": [ [ "7.2.0", "Added entry ID, timestamp created, and timestamp last updated." ] ], "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -2, "arguments": [ { "name": "operation", "type": "oneof", "optional": true, "arguments": [ { "name": "count", "type": "integer", "display_text": "count" }, { "name": "reset", "type": "pure-token", "display_text": "reset", "token": "RESET" } ] } ], "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "ACL SAVE": { "summary": "Saves the effective ACL rules in the configured ACL file.", "since": "6.0.0", "group": "server", "complexity": "O(N). Where N is the number of configured users.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:all_succeeded" ] }, "ACL SETUSER": { "summary": "Creates and modifies an ACL user and its rules.", "since": "6.0.0", "group": "server", "complexity": "O(N). Where N is the number of rules provided.", "history": [ [ "6.2.0", "Added Pub/Sub channel patterns." ], [ "7.0.0", "Added selectors and key based permissions." ] ], "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -3, "arguments": [ { "name": "username", "type": "string", "display_text": "username" }, { "name": "rule", "type": "string", "display_text": "rule", "optional": true, "multiple": true } ], "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:all_succeeded" ] }, "ACL USERS": { "summary": "Lists all ACL users.", "since": "6.0.0", "group": "server", "complexity": "O(N). Where N is the number of configured users.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "ACL WHOAMI": { "summary": "Returns the authenticated username of the current connection.", "since": "6.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "noscript", "loading", "stale" ] }, "APPEND": { "summary": "Appends a string to the value of a key. Creates the key if it doesn't exist.", "since": "2.0.0", "group": "string", "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.", "acl_categories": [ "@write", "@string", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "value", "type": "string", "display_text": "value" } ], "command_flags": [ "write", "denyoom", "fast" ] }, "ASKING": { "summary": "Signals that a cluster client is following an -ASK redirect.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@fast", "@connection" ], "arity": 1, "command_flags": [ "fast" ] }, "AUTH": { "summary": "Authenticates the connection.", "since": "1.0.0", "group": "connection", "complexity": "O(N) where N is the number of passwords defined for the user", "history": [ [ "6.0.0", "Added ACL style (username and password)." ] ], "acl_categories": [ "@fast", "@connection" ], "arity": -2, "arguments": [ { "name": "username", "type": "string", "display_text": "username", "since": "6.0.0", "optional": true }, { "name": "password", "type": "string", "display_text": "password" } ], "command_flags": [ "noscript", "loading", "stale", "fast", "no_auth", "allow_busy" ] }, "BGREWRITEAOF": { "summary": "Asynchronously rewrites the append-only file to disk.", "since": "1.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 1, "command_flags": [ "admin", "noscript", "no_async_loading" ] }, "BGSAVE": { "summary": "Asynchronously saves the database(s) to disk.", "since": "1.0.0", "group": "server", "complexity": "O(1)", "history": [ [ "3.2.2", "Added the `SCHEDULE` option." ] ], "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -1, "arguments": [ { "name": "schedule", "type": "pure-token", "display_text": "schedule", "token": "SCHEDULE", "since": "3.2.2", "optional": true } ], "command_flags": [ "admin", "noscript", "no_async_loading" ] }, "BITCOUNT": { "summary": "Counts the number of set bits (population counting) in a string.", "since": "2.6.0", "group": "bitmap", "complexity": "O(N)", "history": [ [ "7.0.0", "Added the `BYTE|BIT` option." ] ], "acl_categories": [ "@read", "@bitmap", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "range", "type": "block", "optional": true, "arguments": [ { "name": "start", "type": "integer", "display_text": "start" }, { "name": "end", "type": "integer", "display_text": "end" }, { "name": "unit", "type": "oneof", "since": "7.0.0", "optional": true, "arguments": [ { "name": "byte", "type": "pure-token", "display_text": "byte", "token": "BYTE" }, { "name": "bit", "type": "pure-token", "display_text": "bit", "token": "BIT" } ] } ] } ], "command_flags": [ "readonly" ] }, "BITFIELD": { "summary": "Performs arbitrary bitfield integer operations on strings.", "since": "3.2.0", "group": "bitmap", "complexity": "O(1) for each subcommand specified", "acl_categories": [ "@write", "@bitmap", "@slow" ], "arity": -2, "key_specs": [ { "notes": "This command allows both access and modification of the key", "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true, "variable_flags": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "operation", "type": "oneof", "optional": true, "multiple": true, "arguments": [ { "name": "get-block", "type": "block", "token": "GET", "arguments": [ { "name": "encoding", "type": "string", "display_text": "encoding" }, { "name": "offset", "type": "integer", "display_text": "offset" } ] }, { "name": "write", "type": "block", "arguments": [ { "name": "overflow-block", "type": "oneof", "token": "OVERFLOW", "optional": true, "arguments": [ { "name": "wrap", "type": "pure-token", "display_text": "wrap", "token": "WRAP" }, { "name": "sat", "type": "pure-token", "display_text": "sat", "token": "SAT" }, { "name": "fail", "type": "pure-token", "display_text": "fail", "token": "FAIL" } ] }, { "name": "write-operation", "type": "oneof", "arguments": [ { "name": "set-block", "type": "block", "token": "SET", "arguments": [ { "name": "encoding", "type": "string", "display_text": "encoding" }, { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "value", "type": "integer", "display_text": "value" } ] }, { "name": "incrby-block", "type": "block", "token": "INCRBY", "arguments": [ { "name": "encoding", "type": "string", "display_text": "encoding" }, { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "increment", "type": "integer", "display_text": "increment" } ] } ] } ] } ] } ], "command_flags": [ "write", "denyoom" ] }, "BITFIELD_RO": { "summary": "Performs arbitrary read-only bitfield integer operations on strings.", "since": "6.0.0", "group": "bitmap", "complexity": "O(1) for each subcommand specified", "acl_categories": [ "@read", "@bitmap", "@fast" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "get-block", "type": "block", "token": "GET", "optional": true, "multiple": true, "multiple_token": true, "arguments": [ { "name": "encoding", "type": "string", "display_text": "encoding" }, { "name": "offset", "type": "integer", "display_text": "offset" } ] } ], "command_flags": [ "readonly", "fast" ] }, "BITOP": { "summary": "Performs bitwise operations on multiple strings, and stores the result.", "since": "2.6.0", "group": "bitmap", "complexity": "O(N)", "acl_categories": [ "@write", "@bitmap", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true }, { "begin_search": { "type": "index", "spec": { "index": 3 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "operation", "type": "oneof", "arguments": [ { "name": "and", "type": "pure-token", "display_text": "and", "token": "AND" }, { "name": "or", "type": "pure-token", "display_text": "or", "token": "OR" }, { "name": "xor", "type": "pure-token", "display_text": "xor", "token": "XOR" }, { "name": "not", "type": "pure-token", "display_text": "not", "token": "NOT" } ] }, { "name": "destkey", "type": "key", "display_text": "destkey", "key_spec_index": 0 }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 1, "multiple": true } ], "command_flags": [ "write", "denyoom" ] }, "BITPOS": { "summary": "Finds the first set (1) or clear (0) bit in a string.", "since": "2.8.7", "group": "bitmap", "complexity": "O(N)", "history": [ [ "7.0.0", "Added the `BYTE|BIT` option." ] ], "acl_categories": [ "@read", "@bitmap", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "bit", "type": "integer", "display_text": "bit" }, { "name": "range", "type": "block", "optional": true, "arguments": [ { "name": "start", "type": "integer", "display_text": "start" }, { "name": "end-unit-block", "type": "block", "optional": true, "arguments": [ { "name": "end", "type": "integer", "display_text": "end" }, { "name": "unit", "type": "oneof", "since": "7.0.0", "optional": true, "arguments": [ { "name": "byte", "type": "pure-token", "display_text": "byte", "token": "BYTE" }, { "name": "bit", "type": "pure-token", "display_text": "bit", "token": "BIT" } ] } ] } ] } ], "command_flags": [ "readonly" ] }, "BLMOVE": { "summary": "Pops an element from a list, pushes it to another list and returns it. Blocks until an element is available otherwise. Deletes the list if the last element was moved.", "since": "6.2.0", "group": "list", "complexity": "O(1)", "acl_categories": [ "@write", "@list", "@slow", "@blocking" ], "arity": 6, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "source", "type": "key", "display_text": "source", "key_spec_index": 0 }, { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 1 }, { "name": "wherefrom", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "display_text": "left", "token": "LEFT" }, { "name": "right", "type": "pure-token", "display_text": "right", "token": "RIGHT" } ] }, { "name": "whereto", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "display_text": "left", "token": "LEFT" }, { "name": "right", "type": "pure-token", "display_text": "right", "token": "RIGHT" } ] }, { "name": "timeout", "type": "double", "display_text": "timeout" } ], "command_flags": [ "write", "denyoom", "blocking" ] }, "BLMPOP": { "summary": "Pops the first element from one of multiple lists. Blocks until an element is available otherwise. Deletes the list if the last element was popped.", "since": "7.0.0", "group": "list", "complexity": "O(N+M) where N is the number of provided keys and M is the number of elements returned.", "acl_categories": [ "@write", "@list", "@slow", "@blocking" ], "arity": -5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "timeout", "type": "double", "display_text": "timeout" }, { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "where", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "display_text": "left", "token": "LEFT" }, { "name": "right", "type": "pure-token", "display_text": "right", "token": "RIGHT" } ] }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true } ], "command_flags": [ "write", "blocking", "movablekeys" ] }, "BLPOP": { "summary": "Removes and returns the first element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped.", "since": "2.0.0", "group": "list", "complexity": "O(N) where N is the number of provided keys.", "history": [ [ "6.0.0", "`timeout` is interpreted as a double instead of an integer." ] ], "acl_categories": [ "@write", "@list", "@slow", "@blocking" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -2, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "timeout", "type": "double", "display_text": "timeout" } ], "command_flags": [ "write", "blocking" ] }, "BRPOP": { "summary": "Removes and returns the last element in a list. Blocks until an element is available otherwise. Deletes the list if the last element was popped.", "since": "2.0.0", "group": "list", "complexity": "O(N) where N is the number of provided keys.", "history": [ [ "6.0.0", "`timeout` is interpreted as a double instead of an integer." ] ], "acl_categories": [ "@write", "@list", "@slow", "@blocking" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -2, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "timeout", "type": "double", "display_text": "timeout" } ], "command_flags": [ "write", "blocking" ] }, "BRPOPLPUSH": { "summary": "Pops an element from a list, pushes it to another list and returns it. Block until an element is available otherwise. Deletes the list if the last element was popped.", "since": "2.2.0", "group": "list", "complexity": "O(1)", "deprecated_since": "6.2.0", "replaced_by": "`BLMOVE` with the `RIGHT` and `LEFT` arguments", "history": [ [ "6.0.0", "`timeout` is interpreted as a double instead of an integer." ] ], "acl_categories": [ "@write", "@list", "@slow", "@blocking" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "source", "type": "key", "display_text": "source", "key_spec_index": 0 }, { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 1 }, { "name": "timeout", "type": "double", "display_text": "timeout" } ], "command_flags": [ "write", "denyoom", "blocking" ], "doc_flags": [ "deprecated" ] }, "BZMPOP": { "summary": "Removes and returns a member by score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.", "since": "7.0.0", "group": "sorted-set", "complexity": "O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.", "acl_categories": [ "@write", "@sortedset", "@slow", "@blocking" ], "arity": -5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "timeout", "type": "double", "display_text": "timeout" }, { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "where", "type": "oneof", "arguments": [ { "name": "min", "type": "pure-token", "display_text": "min", "token": "MIN" }, { "name": "max", "type": "pure-token", "display_text": "max", "token": "MAX" } ] }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true } ], "command_flags": [ "write", "blocking", "movablekeys" ] }, "BZPOPMAX": { "summary": "Removes and returns the member with the highest score from one or more sorted sets. Blocks until a member available otherwise. Deletes the sorted set if the last element was popped.", "since": "5.0.0", "group": "sorted-set", "complexity": "O(log(N)) with N being the number of elements in the sorted set.", "history": [ [ "6.0.0", "`timeout` is interpreted as a double instead of an integer." ] ], "acl_categories": [ "@write", "@sortedset", "@fast", "@blocking" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -2, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "timeout", "type": "double", "display_text": "timeout" } ], "command_flags": [ "write", "blocking", "fast" ] }, "BZPOPMIN": { "summary": "Removes and returns the member with the lowest score from one or more sorted sets. Blocks until a member is available otherwise. Deletes the sorted set if the last element was popped.", "since": "5.0.0", "group": "sorted-set", "complexity": "O(log(N)) with N being the number of elements in the sorted set.", "history": [ [ "6.0.0", "`timeout` is interpreted as a double instead of an integer." ] ], "acl_categories": [ "@write", "@sortedset", "@fast", "@blocking" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -2, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "timeout", "type": "double", "display_text": "timeout" } ], "command_flags": [ "write", "blocking", "fast" ] }, "CLIENT": { "summary": "A container for client connection commands.", "since": "2.4.0", "group": "connection", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "CLIENT CACHING": { "summary": "Instructs the server whether to track the keys in the next request.", "since": "6.0.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 3, "arguments": [ { "name": "mode", "type": "oneof", "arguments": [ { "name": "yes", "type": "pure-token", "display_text": "yes", "token": "YES" }, { "name": "no", "type": "pure-token", "display_text": "no", "token": "NO" } ] } ], "command_flags": [ "noscript", "loading", "stale" ] }, "CLIENT GETNAME": { "summary": "Returns the name of the connection.", "since": "2.6.9", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 2, "command_flags": [ "noscript", "loading", "stale" ] }, "CLIENT GETREDIR": { "summary": "Returns the client ID to which the connection's tracking notifications are redirected.", "since": "6.0.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 2, "command_flags": [ "noscript", "loading", "stale" ] }, "CLIENT HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "5.0.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "CLIENT ID": { "summary": "Returns the unique client ID of the connection.", "since": "5.0.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 2, "command_flags": [ "noscript", "loading", "stale" ] }, "CLIENT INFO": { "summary": "Returns information about the connection.", "since": "6.2.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 2, "command_flags": [ "noscript", "loading", "stale" ], "hints": [ "nondeterministic_output" ] }, "CLIENT KILL": { "summary": "Terminates open connections.", "since": "2.4.0", "group": "connection", "complexity": "O(N) where N is the number of client connections", "history": [ [ "2.8.12", "Added new filter format." ], [ "2.8.12", "`ID` option." ], [ "3.2.0", "Added `master` type in for `TYPE` option." ], [ "5.0.0", "Replaced `slave` `TYPE` with `replica`. `slave` still supported for backward compatibility." ], [ "6.2.0", "`LADDR` option." ] ], "acl_categories": [ "@admin", "@slow", "@dangerous", "@connection" ], "arity": -3, "arguments": [ { "name": "filter", "type": "oneof", "arguments": [ { "name": "old-format", "type": "string", "display_text": "ip:port", "deprecated_since": "2.8.12" }, { "name": "new-format", "type": "oneof", "multiple": true, "arguments": [ { "name": "client-id", "type": "integer", "display_text": "client-id", "token": "ID", "since": "2.8.12", "optional": true }, { "name": "client-type", "type": "oneof", "token": "TYPE", "since": "2.8.12", "optional": true, "arguments": [ { "name": "normal", "type": "pure-token", "display_text": "normal", "token": "NORMAL" }, { "name": "master", "type": "pure-token", "display_text": "master", "token": "MASTER", "since": "3.2.0" }, { "name": "slave", "type": "pure-token", "display_text": "slave", "token": "SLAVE" }, { "name": "replica", "type": "pure-token", "display_text": "replica", "token": "REPLICA", "since": "5.0.0" }, { "name": "pubsub", "type": "pure-token", "display_text": "pubsub", "token": "PUBSUB" } ] }, { "name": "username", "type": "string", "display_text": "username", "token": "USER", "optional": true }, { "name": "addr", "type": "string", "display_text": "ip:port", "token": "ADDR", "optional": true }, { "name": "laddr", "type": "string", "display_text": "ip:port", "token": "LADDR", "since": "6.2.0", "optional": true }, { "name": "skipme", "type": "oneof", "token": "SKIPME", "optional": true, "arguments": [ { "name": "yes", "type": "pure-token", "display_text": "yes", "token": "YES" }, { "name": "no", "type": "pure-token", "display_text": "no", "token": "NO" } ] } ] } ] } ], "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "CLIENT LIST": { "summary": "Lists open connections.", "since": "2.4.0", "group": "connection", "complexity": "O(N) where N is the number of client connections", "history": [ [ "2.8.12", "Added unique client `id` field." ], [ "5.0.0", "Added optional `TYPE` filter." ], [ "6.0.0", "Added `user` field." ], [ "6.2.0", "Added `argv-mem`, `tot-mem`, `laddr` and `redir` fields and the optional `ID` filter." ], [ "7.0.0", "Added `resp`, `multi-mem`, `rbs` and `rbp` fields." ], [ "7.0.3", "Added `ssub` field." ] ], "acl_categories": [ "@admin", "@slow", "@dangerous", "@connection" ], "arity": -2, "arguments": [ { "name": "client-type", "type": "oneof", "token": "TYPE", "since": "5.0.0", "optional": true, "arguments": [ { "name": "normal", "type": "pure-token", "display_text": "normal", "token": "NORMAL" }, { "name": "master", "type": "pure-token", "display_text": "master", "token": "MASTER" }, { "name": "replica", "type": "pure-token", "display_text": "replica", "token": "REPLICA" }, { "name": "pubsub", "type": "pure-token", "display_text": "pubsub", "token": "PUBSUB" } ] }, { "name": "client-id", "type": "integer", "display_text": "client-id", "token": "ID", "since": "6.2.0", "optional": true, "multiple": true } ], "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "nondeterministic_output" ] }, "CLIENT NO-EVICT": { "summary": "Sets the client eviction mode of the connection.", "since": "7.0.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous", "@connection" ], "arity": 3, "arguments": [ { "name": "enabled", "type": "oneof", "arguments": [ { "name": "on", "type": "pure-token", "display_text": "on", "token": "ON" }, { "name": "off", "type": "pure-token", "display_text": "off", "token": "OFF" } ] } ], "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "CLIENT NO-TOUCH": { "summary": "Controls whether commands sent by the client affect the LRU/LFU of accessed keys.", "since": "7.2.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 3, "arguments": [ { "name": "enabled", "type": "oneof", "arguments": [ { "name": "on", "type": "pure-token", "display_text": "on", "token": "ON" }, { "name": "off", "type": "pure-token", "display_text": "off", "token": "OFF" } ] } ], "command_flags": [ "noscript", "loading", "stale" ] }, "CLIENT PAUSE": { "summary": "Suspends commands processing.", "since": "3.0.0", "group": "connection", "complexity": "O(1)", "history": [ [ "6.2.0", "`CLIENT PAUSE WRITE` mode added along with the `mode` option." ] ], "acl_categories": [ "@admin", "@slow", "@dangerous", "@connection" ], "arity": -3, "arguments": [ { "name": "timeout", "type": "integer", "display_text": "timeout" }, { "name": "mode", "type": "oneof", "since": "6.2.0", "optional": true, "arguments": [ { "name": "write", "type": "pure-token", "display_text": "write", "token": "WRITE" }, { "name": "all", "type": "pure-token", "display_text": "all", "token": "ALL" } ] } ], "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "CLIENT REPLY": { "summary": "Instructs the server whether to reply to commands.", "since": "3.2.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 3, "arguments": [ { "name": "action", "type": "oneof", "arguments": [ { "name": "on", "type": "pure-token", "display_text": "on", "token": "ON" }, { "name": "off", "type": "pure-token", "display_text": "off", "token": "OFF" }, { "name": "skip", "type": "pure-token", "display_text": "skip", "token": "SKIP" } ] } ], "command_flags": [ "noscript", "loading", "stale" ] }, "CLIENT SETINFO": { "summary": "Sets information specific to the client or connection.", "since": "7.2.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 4, "arguments": [ { "name": "attr", "type": "oneof", "arguments": [ { "name": "libname", "type": "string", "display_text": "libname", "token": "LIB-NAME" }, { "name": "libver", "type": "string", "display_text": "libver", "token": "LIB-VER" } ] } ], "command_flags": [ "noscript", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:all_succeeded" ] }, "CLIENT SETNAME": { "summary": "Sets the connection name.", "since": "2.6.9", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 3, "arguments": [ { "name": "connection-name", "type": "string", "display_text": "connection-name" } ], "command_flags": [ "noscript", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:all_succeeded" ] }, "CLIENT TRACKING": { "summary": "Controls server-assisted client-side caching for the connection.", "since": "6.0.0", "group": "connection", "complexity": "O(1). Some options may introduce additional complexity.", "acl_categories": [ "@slow", "@connection" ], "arity": -3, "arguments": [ { "name": "status", "type": "oneof", "arguments": [ { "name": "on", "type": "pure-token", "display_text": "on", "token": "ON" }, { "name": "off", "type": "pure-token", "display_text": "off", "token": "OFF" } ] }, { "name": "client-id", "type": "integer", "display_text": "client-id", "token": "REDIRECT", "optional": true }, { "name": "prefix", "type": "string", "display_text": "prefix", "token": "PREFIX", "optional": true, "multiple": true, "multiple_token": true }, { "name": "bcast", "type": "pure-token", "display_text": "bcast", "token": "BCAST", "optional": true }, { "name": "optin", "type": "pure-token", "display_text": "optin", "token": "OPTIN", "optional": true }, { "name": "optout", "type": "pure-token", "display_text": "optout", "token": "OPTOUT", "optional": true }, { "name": "noloop", "type": "pure-token", "display_text": "noloop", "token": "NOLOOP", "optional": true } ], "command_flags": [ "noscript", "loading", "stale" ] }, "CLIENT TRACKINGINFO": { "summary": "Returns information about server-assisted client-side caching for the connection.", "since": "6.2.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 2, "command_flags": [ "noscript", "loading", "stale" ] }, "CLIENT UNBLOCK": { "summary": "Unblocks a client blocked by a blocking command from a different connection.", "since": "5.0.0", "group": "connection", "complexity": "O(log N) where N is the number of client connections", "acl_categories": [ "@admin", "@slow", "@dangerous", "@connection" ], "arity": -3, "arguments": [ { "name": "client-id", "type": "integer", "display_text": "client-id" }, { "name": "unblock-type", "type": "oneof", "optional": true, "arguments": [ { "name": "timeout", "type": "pure-token", "display_text": "timeout", "token": "TIMEOUT" }, { "name": "error", "type": "pure-token", "display_text": "error", "token": "ERROR" } ] } ], "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "CLIENT UNPAUSE": { "summary": "Resumes processing commands from paused clients.", "since": "6.2.0", "group": "connection", "complexity": "O(N) Where N is the number of paused clients", "acl_categories": [ "@admin", "@slow", "@dangerous", "@connection" ], "arity": 2, "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "CLUSTER": { "summary": "A container for Redis Cluster commands.", "since": "3.0.0", "group": "cluster", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "CLUSTER ADDSLOTS": { "summary": "Assigns new hash slots to a node.", "since": "3.0.0", "group": "cluster", "complexity": "O(N) where N is the total number of hash slot arguments", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -3, "arguments": [ { "name": "slot", "type": "integer", "display_text": "slot", "multiple": true } ], "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER ADDSLOTSRANGE": { "summary": "Assigns new hash slot ranges to a node.", "since": "7.0.0", "group": "cluster", "complexity": "O(N) where N is the total number of the slots between the start slot and end slot arguments.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -4, "arguments": [ { "name": "range", "type": "block", "multiple": true, "arguments": [ { "name": "start-slot", "type": "integer", "display_text": "start-slot" }, { "name": "end-slot", "type": "integer", "display_text": "end-slot" } ] } ], "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER BUMPEPOCH": { "summary": "Advances the cluster config epoch.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "stale", "no_async_loading" ], "hints": [ "nondeterministic_output" ] }, "CLUSTER COUNT-FAILURE-REPORTS": { "summary": "Returns the number of active failure reports active for a node.", "since": "3.0.0", "group": "cluster", "complexity": "O(N) where N is the number of failure reports", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "node-id", "type": "string", "display_text": "node-id" } ], "command_flags": [ "admin", "stale" ], "hints": [ "nondeterministic_output" ] }, "CLUSTER COUNTKEYSINSLOT": { "summary": "Returns the number of keys in a hash slot.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 3, "arguments": [ { "name": "slot", "type": "integer", "display_text": "slot" } ], "command_flags": [ "stale" ] }, "CLUSTER DELSLOTS": { "summary": "Sets hash slots as unbound for a node.", "since": "3.0.0", "group": "cluster", "complexity": "O(N) where N is the total number of hash slot arguments", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -3, "arguments": [ { "name": "slot", "type": "integer", "display_text": "slot", "multiple": true } ], "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER DELSLOTSRANGE": { "summary": "Sets hash slot ranges as unbound for a node.", "since": "7.0.0", "group": "cluster", "complexity": "O(N) where N is the total number of the slots between the start slot and end slot arguments.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -4, "arguments": [ { "name": "range", "type": "block", "multiple": true, "arguments": [ { "name": "start-slot", "type": "integer", "display_text": "start-slot" }, { "name": "end-slot", "type": "integer", "display_text": "end-slot" } ] } ], "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER FAILOVER": { "summary": "Forces a replica to perform a manual failover of its master.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -2, "arguments": [ { "name": "options", "type": "oneof", "optional": true, "arguments": [ { "name": "force", "type": "pure-token", "display_text": "force", "token": "FORCE" }, { "name": "takeover", "type": "pure-token", "display_text": "takeover", "token": "TAKEOVER" } ] } ], "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER FLUSHSLOTS": { "summary": "Deletes all slots information from a node.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER FORGET": { "summary": "Removes a node from the nodes table.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "node-id", "type": "string", "display_text": "node-id" } ], "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER GETKEYSINSLOT": { "summary": "Returns the key names in a hash slot.", "since": "3.0.0", "group": "cluster", "complexity": "O(N) where N is the number of requested keys", "acl_categories": [ "@slow" ], "arity": 4, "arguments": [ { "name": "slot", "type": "integer", "display_text": "slot" }, { "name": "count", "type": "integer", "display_text": "count" } ], "command_flags": [ "stale" ], "hints": [ "nondeterministic_output" ] }, "CLUSTER HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "5.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "CLUSTER INFO": { "summary": "Returns information about the state of a node.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "stale" ], "hints": [ "nondeterministic_output" ] }, "CLUSTER KEYSLOT": { "summary": "Returns the hash slot for a key.", "since": "3.0.0", "group": "cluster", "complexity": "O(N) where N is the number of bytes in the key", "acl_categories": [ "@slow" ], "arity": 3, "arguments": [ { "name": "key", "type": "string", "display_text": "key" } ], "command_flags": [ "stale" ] }, "CLUSTER LINKS": { "summary": "Returns a list of all TCP links to and from peer nodes.", "since": "7.0.0", "group": "cluster", "complexity": "O(N) where N is the total number of Cluster nodes", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "stale" ], "hints": [ "nondeterministic_output" ] }, "CLUSTER MEET": { "summary": "Forces a node to handshake with another node.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "history": [ [ "4.0.0", "Added the optional `cluster_bus_port` argument." ] ], "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -4, "arguments": [ { "name": "ip", "type": "string", "display_text": "ip" }, { "name": "port", "type": "integer", "display_text": "port" }, { "name": "cluster-bus-port", "type": "integer", "display_text": "cluster-bus-port", "since": "4.0.0", "optional": true } ], "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER MYID": { "summary": "Returns the ID of a node.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "stale" ] }, "CLUSTER MYSHARDID": { "summary": "Returns the shard ID of a node.", "since": "7.2.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "stale" ], "hints": [ "nondeterministic_output" ] }, "CLUSTER NODES": { "summary": "Returns the cluster configuration for a node.", "since": "3.0.0", "group": "cluster", "complexity": "O(N) where N is the total number of Cluster nodes", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "stale" ], "hints": [ "nondeterministic_output" ] }, "CLUSTER REPLICAS": { "summary": "Lists the replica nodes of a master node.", "since": "5.0.0", "group": "cluster", "complexity": "O(N) where N is the number of replicas.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "node-id", "type": "string", "display_text": "node-id" } ], "command_flags": [ "admin", "stale" ], "hints": [ "nondeterministic_output" ] }, "CLUSTER REPLICATE": { "summary": "Configure a node as replica of a master node.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "node-id", "type": "string", "display_text": "node-id" } ], "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER RESET": { "summary": "Resets a node.", "since": "3.0.0", "group": "cluster", "complexity": "O(N) where N is the number of known nodes. The command may execute a FLUSHALL as a side effect.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -2, "arguments": [ { "name": "reset-type", "type": "oneof", "optional": true, "arguments": [ { "name": "hard", "type": "pure-token", "display_text": "hard", "token": "HARD" }, { "name": "soft", "type": "pure-token", "display_text": "soft", "token": "SOFT" } ] } ], "command_flags": [ "admin", "noscript", "stale" ] }, "CLUSTER SAVECONFIG": { "summary": "Forces a node to save the cluster configuration to disk.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER SET-CONFIG-EPOCH": { "summary": "Sets the configuration epoch for a new node.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "config-epoch", "type": "integer", "display_text": "config-epoch" } ], "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER SETSLOT": { "summary": "Binds a hash slot to a node.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -4, "arguments": [ { "name": "slot", "type": "integer", "display_text": "slot" }, { "name": "subcommand", "type": "oneof", "arguments": [ { "name": "importing", "type": "string", "display_text": "node-id", "token": "IMPORTING" }, { "name": "migrating", "type": "string", "display_text": "node-id", "token": "MIGRATING" }, { "name": "node", "type": "string", "display_text": "node-id", "token": "NODE" }, { "name": "stable", "type": "pure-token", "display_text": "stable", "token": "STABLE" } ] } ], "command_flags": [ "admin", "stale", "no_async_loading" ] }, "CLUSTER SHARDS": { "summary": "Returns the mapping of cluster slots to shards.", "since": "7.0.0", "group": "cluster", "complexity": "O(N) where N is the total number of cluster nodes", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ], "hints": [ "nondeterministic_output" ] }, "CLUSTER SLAVES": { "summary": "Lists the replica nodes of a master node.", "since": "3.0.0", "group": "cluster", "complexity": "O(N) where N is the number of replicas.", "deprecated_since": "5.0.0", "replaced_by": "`CLUSTER REPLICAS`", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "node-id", "type": "string", "display_text": "node-id" } ], "command_flags": [ "admin", "stale" ], "doc_flags": [ "deprecated" ], "hints": [ "nondeterministic_output" ] }, "CLUSTER SLOTS": { "summary": "Returns the mapping of cluster slots to nodes.", "since": "3.0.0", "group": "cluster", "complexity": "O(N) where N is the total number of Cluster nodes", "deprecated_since": "7.0.0", "replaced_by": "`CLUSTER SHARDS`", "history": [ [ "4.0.0", "Added node IDs." ], [ "7.0.0", "Added additional networking metadata field." ] ], "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ], "doc_flags": [ "deprecated" ], "hints": [ "nondeterministic_output" ] }, "COMMAND": { "summary": "Returns detailed information about all commands.", "since": "2.8.13", "group": "server", "complexity": "O(N) where N is the total number of Redis commands", "acl_categories": [ "@slow", "@connection" ], "arity": -1, "command_flags": [ "loading", "stale" ], "hints": [ "nondeterministic_output_order" ] }, "COMMAND COUNT": { "summary": "Returns a count of commands.", "since": "2.8.13", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "COMMAND DOCS": { "summary": "Returns documentary information about one, multiple or all commands.", "since": "7.0.0", "group": "server", "complexity": "O(N) where N is the number of commands to look up", "acl_categories": [ "@slow", "@connection" ], "arity": -2, "arguments": [ { "name": "command-name", "type": "string", "display_text": "command-name", "optional": true, "multiple": true } ], "command_flags": [ "loading", "stale" ], "hints": [ "nondeterministic_output_order" ] }, "COMMAND GETKEYS": { "summary": "Extracts the key names from an arbitrary command.", "since": "2.8.13", "group": "server", "complexity": "O(N) where N is the number of arguments to the command", "acl_categories": [ "@slow", "@connection" ], "arity": -3, "arguments": [ { "name": "command", "type": "string", "display_text": "command" }, { "name": "arg", "type": "string", "display_text": "arg", "optional": true, "multiple": true } ], "command_flags": [ "loading", "stale" ] }, "COMMAND GETKEYSANDFLAGS": { "summary": "Extracts the key names and access flags for an arbitrary command.", "since": "7.0.0", "group": "server", "complexity": "O(N) where N is the number of arguments to the command", "acl_categories": [ "@slow", "@connection" ], "arity": -3, "arguments": [ { "name": "command", "type": "string", "display_text": "command" }, { "name": "arg", "type": "string", "display_text": "arg", "optional": true, "multiple": true } ], "command_flags": [ "loading", "stale" ] }, "COMMAND HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "5.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "COMMAND INFO": { "summary": "Returns information about one, multiple or all commands.", "since": "2.8.13", "group": "server", "complexity": "O(N) where N is the number of commands to look up", "history": [ [ "7.0.0", "Allowed to be called with no argument to get info on all commands." ] ], "acl_categories": [ "@slow", "@connection" ], "arity": -2, "arguments": [ { "name": "command-name", "type": "string", "display_text": "command-name", "optional": true, "multiple": true } ], "command_flags": [ "loading", "stale" ], "hints": [ "nondeterministic_output_order" ] }, "COMMAND LIST": { "summary": "Returns a list of command names.", "since": "7.0.0", "group": "server", "complexity": "O(N) where N is the total number of Redis commands", "acl_categories": [ "@slow", "@connection" ], "arity": -2, "arguments": [ { "name": "filterby", "type": "oneof", "token": "FILTERBY", "optional": true, "arguments": [ { "name": "module-name", "type": "string", "display_text": "module-name", "token": "MODULE" }, { "name": "category", "type": "string", "display_text": "category", "token": "ACLCAT" }, { "name": "pattern", "type": "pattern", "display_text": "pattern", "token": "PATTERN" } ] } ], "command_flags": [ "loading", "stale" ], "hints": [ "nondeterministic_output_order" ] }, "CONFIG": { "summary": "A container for server configuration commands.", "since": "2.0.0", "group": "server", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "CONFIG GET": { "summary": "Returns the effective values of configuration parameters.", "since": "2.0.0", "group": "server", "complexity": "O(N) when N is the number of configuration parameters provided", "history": [ [ "7.0.0", "Added the ability to pass multiple pattern parameters in one call" ] ], "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -3, "arguments": [ { "name": "parameter", "type": "string", "display_text": "parameter", "multiple": true } ], "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "CONFIG HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "5.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "CONFIG RESETSTAT": { "summary": "Resets the server's statistics.", "since": "2.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:all_succeeded" ] }, "CONFIG REWRITE": { "summary": "Persists the effective configuration to file.", "since": "2.8.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:all_succeeded" ] }, "CONFIG SET": { "summary": "Sets configuration parameters in-flight.", "since": "2.0.0", "group": "server", "complexity": "O(N) when N is the number of configuration parameters provided", "history": [ [ "7.0.0", "Added the ability to set multiple parameters in one call." ] ], "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -4, "arguments": [ { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "parameter", "type": "string", "display_text": "parameter" }, { "name": "value", "type": "string", "display_text": "value" } ] } ], "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:all_succeeded" ] }, "COPY": { "summary": "Copies the value of a key to a new key.", "since": "6.2.0", "group": "generic", "complexity": "O(N) worst case for collections, where N is the number of nested items. O(1) for string values.", "acl_categories": [ "@keyspace", "@write", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true } ], "arguments": [ { "name": "source", "type": "key", "display_text": "source", "key_spec_index": 0 }, { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 1 }, { "name": "destination-db", "type": "integer", "display_text": "destination-db", "token": "DB", "optional": true }, { "name": "replace", "type": "pure-token", "display_text": "replace", "token": "REPLACE", "optional": true } ], "command_flags": [ "write", "denyoom" ] }, "DBSIZE": { "summary": "Returns the number of keys in the database.", "since": "1.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@read", "@fast" ], "arity": 1, "command_flags": [ "readonly", "fast" ], "hints": [ "request_policy:all_shards", "response_policy:agg_sum" ] }, "DEBUG": { "summary": "A container for debugging commands.", "since": "1.0.0", "group": "server", "complexity": "Depends on subcommand.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -2, "command_flags": [ "admin", "noscript", "loading", "stale" ], "doc_flags": [ "syscmd" ] }, "DECR": { "summary": "Decrements the integer value of a key by one. Uses 0 as initial value if the key doesn't exist.", "since": "1.0.0", "group": "string", "complexity": "O(1)", "acl_categories": [ "@write", "@string", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "write", "denyoom", "fast" ] }, "DECRBY": { "summary": "Decrements a number from the integer value of a key. Uses 0 as initial value if the key doesn't exist.", "since": "1.0.0", "group": "string", "complexity": "O(1)", "acl_categories": [ "@write", "@string", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "decrement", "type": "integer", "display_text": "decrement" } ], "command_flags": [ "write", "denyoom", "fast" ] }, "DEL": { "summary": "Deletes one or more keys.", "since": "1.0.0", "group": "generic", "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).", "acl_categories": [ "@keyspace", "@write", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RM": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true } ], "command_flags": [ "write" ], "hints": [ "request_policy:multi_shard", "response_policy:agg_sum" ] }, "DISCARD": { "summary": "Discards a transaction.", "since": "2.0.0", "group": "transactions", "complexity": "O(N), when N is the number of queued commands", "acl_categories": [ "@fast", "@transaction" ], "arity": 1, "command_flags": [ "noscript", "loading", "stale", "fast", "allow_busy" ] }, "DUMP": { "summary": "Returns a serialized representation of the value stored at a key.", "since": "2.6.0", "group": "generic", "complexity": "O(1) to access the key and additional O(N*M) to serialize 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).", "acl_categories": [ "@keyspace", "@read", "@slow" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "ECHO": { "summary": "Returns the given string.", "since": "1.0.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@fast", "@connection" ], "arity": 2, "arguments": [ { "name": "message", "type": "string", "display_text": "message" } ], "command_flags": [ "loading", "stale", "fast" ] }, "EVAL": { "summary": "Executes a server-side Lua script.", "since": "2.6.0", "group": "scripting", "complexity": "Depends on the script that is executed.", "acl_categories": [ "@slow", "@scripting" ], "arity": -3, "key_specs": [ { "notes": "We cannot tell how the keys will be used so we assume the worst, RW and UPDATE", "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "script", "type": "string", "display_text": "script" }, { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "optional": true, "multiple": true }, { "name": "arg", "type": "string", "display_text": "arg", "optional": true, "multiple": true } ], "command_flags": [ "noscript", "stale", "skip_monitor", "no_mandatory_keys", "movablekeys" ] }, "EVALSHA": { "summary": "Executes a server-side Lua script by SHA1 digest.", "since": "2.6.0", "group": "scripting", "complexity": "Depends on the script that is executed.", "acl_categories": [ "@slow", "@scripting" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "sha1", "type": "string", "display_text": "sha1" }, { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "optional": true, "multiple": true }, { "name": "arg", "type": "string", "display_text": "arg", "optional": true, "multiple": true } ], "command_flags": [ "noscript", "stale", "skip_monitor", "no_mandatory_keys", "movablekeys" ] }, "EVALSHA_RO": { "summary": "Executes a read-only server-side Lua script by SHA1 digest.", "since": "7.0.0", "group": "scripting", "complexity": "Depends on the script that is executed.", "acl_categories": [ "@slow", "@scripting" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RO": true, "access": true } ], "arguments": [ { "name": "sha1", "type": "string", "display_text": "sha1" }, { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "optional": true, "multiple": true }, { "name": "arg", "type": "string", "display_text": "arg", "optional": true, "multiple": true } ], "command_flags": [ "readonly", "noscript", "stale", "skip_monitor", "no_mandatory_keys", "movablekeys" ] }, "EVAL_RO": { "summary": "Executes a read-only server-side Lua script.", "since": "7.0.0", "group": "scripting", "complexity": "Depends on the script that is executed.", "acl_categories": [ "@slow", "@scripting" ], "arity": -3, "key_specs": [ { "notes": "We cannot tell how the keys will be used so we assume the worst, RO and ACCESS", "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RO": true, "access": true } ], "arguments": [ { "name": "script", "type": "string", "display_text": "script" }, { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "optional": true, "multiple": true }, { "name": "arg", "type": "string", "display_text": "arg", "optional": true, "multiple": true } ], "command_flags": [ "readonly", "noscript", "stale", "skip_monitor", "no_mandatory_keys", "movablekeys" ] }, "EXEC": { "summary": "Executes all commands in a transaction.", "since": "1.2.0", "group": "transactions", "complexity": "Depends on commands in the transaction", "acl_categories": [ "@slow", "@transaction" ], "arity": 1, "command_flags": [ "noscript", "loading", "stale", "skip_slowlog" ] }, "EXISTS": { "summary": "Determines whether one or more keys exist.", "since": "1.0.0", "group": "generic", "complexity": "O(N) where N is the number of keys to check.", "history": [ [ "3.0.3", "Accepts multiple `key` arguments." ] ], "acl_categories": [ "@keyspace", "@read", "@fast" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true } ], "command_flags": [ "readonly", "fast" ], "hints": [ "request_policy:multi_shard", "response_policy:agg_sum" ] }, "EXPIRE": { "summary": "Sets the expiration time of a key in seconds.", "since": "1.0.0", "group": "generic", "complexity": "O(1)", "history": [ [ "7.0.0", "Added options: `NX`, `XX`, `GT` and `LT`." ] ], "acl_categories": [ "@keyspace", "@write", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "seconds", "type": "integer", "display_text": "seconds" }, { "name": "condition", "type": "oneof", "since": "7.0.0", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "display_text": "nx", "token": "NX" }, { "name": "xx", "type": "pure-token", "display_text": "xx", "token": "XX" }, { "name": "gt", "type": "pure-token", "display_text": "gt", "token": "GT" }, { "name": "lt", "type": "pure-token", "display_text": "lt", "token": "LT" } ] } ], "command_flags": [ "write", "fast" ] }, "EXPIREAT": { "summary": "Sets the expiration time of a key to a Unix timestamp.", "since": "1.2.0", "group": "generic", "complexity": "O(1)", "history": [ [ "7.0.0", "Added options: `NX`, `XX`, `GT` and `LT`." ] ], "acl_categories": [ "@keyspace", "@write", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "unix-time-seconds", "type": "unix-time", "display_text": "unix-time-seconds" }, { "name": "condition", "type": "oneof", "since": "7.0.0", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "display_text": "nx", "token": "NX" }, { "name": "xx", "type": "pure-token", "display_text": "xx", "token": "XX" }, { "name": "gt", "type": "pure-token", "display_text": "gt", "token": "GT" }, { "name": "lt", "type": "pure-token", "display_text": "lt", "token": "LT" } ] } ], "command_flags": [ "write", "fast" ] }, "EXPIRETIME": { "summary": "Returns the expiration time of a key as a Unix timestamp.", "since": "7.0.0", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@read", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ] }, "FAILOVER": { "summary": "Starts a coordinated failover from a server to one of its replicas.", "since": "6.2.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -1, "arguments": [ { "name": "target", "type": "block", "token": "TO", "optional": true, "arguments": [ { "name": "host", "type": "string", "display_text": "host" }, { "name": "port", "type": "integer", "display_text": "port" }, { "name": "force", "type": "pure-token", "display_text": "force", "token": "FORCE", "optional": true } ] }, { "name": "abort", "type": "pure-token", "display_text": "abort", "token": "ABORT", "optional": true }, { "name": "milliseconds", "type": "integer", "display_text": "milliseconds", "token": "TIMEOUT", "optional": true } ], "command_flags": [ "admin", "noscript", "stale" ] }, "FCALL": { "summary": "Invokes a function.", "since": "7.0.0", "group": "scripting", "complexity": "Depends on the function that is executed.", "acl_categories": [ "@slow", "@scripting" ], "arity": -3, "key_specs": [ { "notes": "We cannot tell how the keys will be used so we assume the worst, RW and UPDATE", "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "function", "type": "string", "display_text": "function" }, { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "optional": true, "multiple": true }, { "name": "arg", "type": "string", "display_text": "arg", "optional": true, "multiple": true } ], "command_flags": [ "noscript", "stale", "skip_monitor", "no_mandatory_keys", "movablekeys" ] }, "FCALL_RO": { "summary": "Invokes a read-only function.", "since": "7.0.0", "group": "scripting", "complexity": "Depends on the function that is executed.", "acl_categories": [ "@slow", "@scripting" ], "arity": -3, "key_specs": [ { "notes": "We cannot tell how the keys will be used so we assume the worst, RO and ACCESS", "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RO": true, "access": true } ], "arguments": [ { "name": "function", "type": "string", "display_text": "function" }, { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "optional": true, "multiple": true }, { "name": "arg", "type": "string", "display_text": "arg", "optional": true, "multiple": true } ], "command_flags": [ "readonly", "noscript", "stale", "skip_monitor", "no_mandatory_keys", "movablekeys" ] }, "FLUSHALL": { "summary": "Removes all keys from all databases.", "since": "1.0.0", "group": "server", "complexity": "O(N) where N is the total number of keys in all databases", "history": [ [ "4.0.0", "Added the `ASYNC` flushing mode modifier." ], [ "6.2.0", "Added the `SYNC` flushing mode modifier." ] ], "acl_categories": [ "@keyspace", "@write", "@slow", "@dangerous" ], "arity": -1, "arguments": [ { "name": "flush-type", "type": "oneof", "optional": true, "arguments": [ { "name": "async", "type": "pure-token", "display_text": "async", "token": "ASYNC", "since": "4.0.0" }, { "name": "sync", "type": "pure-token", "display_text": "sync", "token": "SYNC", "since": "6.2.0" } ] } ], "command_flags": [ "write" ], "hints": [ "request_policy:all_shards", "response_policy:all_succeeded" ] }, "FLUSHDB": { "summary": "Remove all keys from the current database.", "since": "1.0.0", "group": "server", "complexity": "O(N) where N is the number of keys in the selected database", "history": [ [ "4.0.0", "Added the `ASYNC` flushing mode modifier." ], [ "6.2.0", "Added the `SYNC` flushing mode modifier." ] ], "acl_categories": [ "@keyspace", "@write", "@slow", "@dangerous" ], "arity": -1, "arguments": [ { "name": "flush-type", "type": "oneof", "optional": true, "arguments": [ { "name": "async", "type": "pure-token", "display_text": "async", "token": "ASYNC", "since": "4.0.0" }, { "name": "sync", "type": "pure-token", "display_text": "sync", "token": "SYNC", "since": "6.2.0" } ] } ], "command_flags": [ "write" ], "hints": [ "request_policy:all_shards", "response_policy:all_succeeded" ] }, "FUNCTION": { "summary": "A container for function commands.", "since": "7.0.0", "group": "scripting", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "FUNCTION DELETE": { "summary": "Deletes a library and its functions.", "since": "7.0.0", "group": "scripting", "complexity": "O(1)", "acl_categories": [ "@write", "@slow", "@scripting" ], "arity": 3, "arguments": [ { "name": "library-name", "type": "string", "display_text": "library-name" } ], "command_flags": [ "write", "noscript" ], "hints": [ "request_policy:all_shards", "response_policy:all_succeeded" ] }, "FUNCTION DUMP": { "summary": "Dumps all libraries into a serialized binary payload.", "since": "7.0.0", "group": "scripting", "complexity": "O(N) where N is the number of functions", "acl_categories": [ "@slow", "@scripting" ], "arity": 2, "command_flags": [ "noscript" ] }, "FUNCTION FLUSH": { "summary": "Deletes all libraries and functions.", "since": "7.0.0", "group": "scripting", "complexity": "O(N) where N is the number of functions deleted", "acl_categories": [ "@write", "@slow", "@scripting" ], "arity": -2, "arguments": [ { "name": "flush-type", "type": "oneof", "optional": true, "arguments": [ { "name": "async", "type": "pure-token", "display_text": "async", "token": "ASYNC" }, { "name": "sync", "type": "pure-token", "display_text": "sync", "token": "SYNC" } ] } ], "command_flags": [ "write", "noscript" ], "hints": [ "request_policy:all_shards", "response_policy:all_succeeded" ] }, "FUNCTION HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "7.0.0", "group": "scripting", "complexity": "O(1)", "acl_categories": [ "@slow", "@scripting" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "FUNCTION KILL": { "summary": "Terminates a function during execution.", "since": "7.0.0", "group": "scripting", "complexity": "O(1)", "acl_categories": [ "@slow", "@scripting" ], "arity": 2, "command_flags": [ "noscript", "allow_busy" ], "hints": [ "request_policy:all_shards", "response_policy:one_succeeded" ] }, "FUNCTION LIST": { "summary": "Returns information about all libraries.", "since": "7.0.0", "group": "scripting", "complexity": "O(N) where N is the number of functions", "acl_categories": [ "@slow", "@scripting" ], "arity": -2, "arguments": [ { "name": "library-name-pattern", "type": "string", "display_text": "library-name-pattern", "token": "LIBRARYNAME", "optional": true }, { "name": "withcode", "type": "pure-token", "display_text": "withcode", "token": "WITHCODE", "optional": true } ], "command_flags": [ "noscript" ], "hints": [ "nondeterministic_output_order" ] }, "FUNCTION LOAD": { "summary": "Creates a library.", "since": "7.0.0", "group": "scripting", "complexity": "O(1) (considering compilation time is redundant)", "acl_categories": [ "@write", "@slow", "@scripting" ], "arity": -3, "arguments": [ { "name": "replace", "type": "pure-token", "display_text": "replace", "token": "REPLACE", "optional": true }, { "name": "function-code", "type": "string", "display_text": "function-code" } ], "command_flags": [ "write", "denyoom", "noscript" ], "hints": [ "request_policy:all_shards", "response_policy:all_succeeded" ] }, "FUNCTION RESTORE": { "summary": "Restores all libraries from a payload.", "since": "7.0.0", "group": "scripting", "complexity": "O(N) where N is the number of functions on the payload", "acl_categories": [ "@write", "@slow", "@scripting" ], "arity": -3, "arguments": [ { "name": "serialized-value", "type": "string", "display_text": "serialized-value" }, { "name": "policy", "type": "oneof", "optional": true, "arguments": [ { "name": "flush", "type": "pure-token", "display_text": "flush", "token": "FLUSH" }, { "name": "append", "type": "pure-token", "display_text": "append", "token": "APPEND" }, { "name": "replace", "type": "pure-token", "display_text": "replace", "token": "REPLACE" } ] } ], "command_flags": [ "write", "denyoom", "noscript" ], "hints": [ "request_policy:all_shards", "response_policy:all_succeeded" ] }, "FUNCTION STATS": { "summary": "Returns information about a function during execution.", "since": "7.0.0", "group": "scripting", "complexity": "O(1)", "acl_categories": [ "@slow", "@scripting" ], "arity": 2, "command_flags": [ "noscript", "allow_busy" ], "hints": [ "nondeterministic_output", "request_policy:all_shards", "response_policy:special" ] }, "GEOADD": { "summary": "Adds one or more members to a geospatial index. The key is created if it doesn't exist.", "since": "3.2.0", "group": "geo", "complexity": "O(log(N)) for each item added, where N is the number of elements in the sorted set.", "history": [ [ "6.2.0", "Added the `CH`, `NX` and `XX` options." ] ], "acl_categories": [ "@write", "@geo", "@slow" ], "arity": -5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "condition", "type": "oneof", "since": "6.2.0", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "display_text": "nx", "token": "NX" }, { "name": "xx", "type": "pure-token", "display_text": "xx", "token": "XX" } ] }, { "name": "change", "type": "pure-token", "display_text": "change", "token": "CH", "since": "6.2.0", "optional": true }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "longitude", "type": "double", "display_text": "longitude" }, { "name": "latitude", "type": "double", "display_text": "latitude" }, { "name": "member", "type": "string", "display_text": "member" } ] } ], "command_flags": [ "write", "denyoom" ] }, "GEODIST": { "summary": "Returns the distance between two members of a geospatial index.", "since": "3.2.0", "group": "geo", "complexity": "O(1)", "acl_categories": [ "@read", "@geo", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member1", "type": "string", "display_text": "member1" }, { "name": "member2", "type": "string", "display_text": "member2" }, { "name": "unit", "type": "oneof", "optional": true, "arguments": [ { "name": "m", "type": "pure-token", "display_text": "m", "token": "M" }, { "name": "km", "type": "pure-token", "display_text": "km", "token": "KM" }, { "name": "ft", "type": "pure-token", "display_text": "ft", "token": "FT" }, { "name": "mi", "type": "pure-token", "display_text": "mi", "token": "MI" } ] } ], "command_flags": [ "readonly" ] }, "GEOHASH": { "summary": "Returns members from a geospatial index as geohash strings.", "since": "3.2.0", "group": "geo", "complexity": "O(1) for each member requested.", "acl_categories": [ "@read", "@geo", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member", "optional": true, "multiple": true } ], "command_flags": [ "readonly" ] }, "GEOPOS": { "summary": "Returns the longitude and latitude of members from a geospatial index.", "since": "3.2.0", "group": "geo", "complexity": "O(1) for each member requested.", "acl_categories": [ "@read", "@geo", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member", "optional": true, "multiple": true } ], "command_flags": [ "readonly" ] }, "GEORADIUS": { "summary": "Queries a geospatial index for members within a distance from a coordinate, optionally stores the result.", "since": "3.2.0", "group": "geo", "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.", "deprecated_since": "6.2.0", "replaced_by": "`GEOSEARCH` and `GEOSEARCHSTORE` with the `BYRADIUS` argument", "history": [ [ "6.2.0", "Added the `ANY` option for `COUNT`." ], [ "7.0.0", "Added support for uppercase unit names." ] ], "acl_categories": [ "@write", "@geo", "@slow" ], "arity": -6, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true }, { "begin_search": { "type": "keyword", "spec": { "keyword": "STORE", "startfrom": 6 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true }, { "begin_search": { "type": "keyword", "spec": { "keyword": "STOREDIST", "startfrom": 6 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "longitude", "type": "double", "display_text": "longitude" }, { "name": "latitude", "type": "double", "display_text": "latitude" }, { "name": "radius", "type": "double", "display_text": "radius" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "display_text": "m", "token": "M" }, { "name": "km", "type": "pure-token", "display_text": "km", "token": "KM" }, { "name": "ft", "type": "pure-token", "display_text": "ft", "token": "FT" }, { "name": "mi", "type": "pure-token", "display_text": "mi", "token": "MI" } ] }, { "name": "withcoord", "type": "pure-token", "display_text": "withcoord", "token": "WITHCOORD", "optional": true }, { "name": "withdist", "type": "pure-token", "display_text": "withdist", "token": "WITHDIST", "optional": true }, { "name": "withhash", "type": "pure-token", "display_text": "withhash", "token": "WITHHASH", "optional": true }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT" }, { "name": "any", "type": "pure-token", "display_text": "any", "token": "ANY", "since": "6.2.0", "optional": true } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "display_text": "asc", "token": "ASC" }, { "name": "desc", "type": "pure-token", "display_text": "desc", "token": "DESC" } ] }, { "name": "store", "type": "oneof", "optional": true, "arguments": [ { "name": "storekey", "type": "key", "display_text": "key", "key_spec_index": 1, "token": "STORE" }, { "name": "storedistkey", "type": "key", "display_text": "key", "key_spec_index": 2, "token": "STOREDIST" } ] } ], "command_flags": [ "write", "denyoom", "movablekeys" ], "doc_flags": [ "deprecated" ] }, "GEORADIUSBYMEMBER": { "summary": "Queries a geospatial index for members within a distance from a member, optionally stores the result.", "since": "3.2.0", "group": "geo", "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.", "deprecated_since": "6.2.0", "replaced_by": "`GEOSEARCH` and `GEOSEARCHSTORE` with the `BYRADIUS` and `FROMMEMBER` arguments", "history": [ [ "7.0.0", "Added support for uppercase unit names." ] ], "acl_categories": [ "@write", "@geo", "@slow" ], "arity": -5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true }, { "begin_search": { "type": "keyword", "spec": { "keyword": "STORE", "startfrom": 5 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true }, { "begin_search": { "type": "keyword", "spec": { "keyword": "STOREDIST", "startfrom": 5 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member" }, { "name": "radius", "type": "double", "display_text": "radius" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "display_text": "m", "token": "M" }, { "name": "km", "type": "pure-token", "display_text": "km", "token": "KM" }, { "name": "ft", "type": "pure-token", "display_text": "ft", "token": "FT" }, { "name": "mi", "type": "pure-token", "display_text": "mi", "token": "MI" } ] }, { "name": "withcoord", "type": "pure-token", "display_text": "withcoord", "token": "WITHCOORD", "optional": true }, { "name": "withdist", "type": "pure-token", "display_text": "withdist", "token": "WITHDIST", "optional": true }, { "name": "withhash", "type": "pure-token", "display_text": "withhash", "token": "WITHHASH", "optional": true }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT" }, { "name": "any", "type": "pure-token", "display_text": "any", "token": "ANY", "optional": true } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "display_text": "asc", "token": "ASC" }, { "name": "desc", "type": "pure-token", "display_text": "desc", "token": "DESC" } ] }, { "name": "store", "type": "oneof", "optional": true, "arguments": [ { "name": "storekey", "type": "key", "display_text": "key", "key_spec_index": 1, "token": "STORE" }, { "name": "storedistkey", "type": "key", "display_text": "key", "key_spec_index": 2, "token": "STOREDIST" } ] } ], "command_flags": [ "write", "denyoom", "movablekeys" ], "doc_flags": [ "deprecated" ] }, "GEORADIUSBYMEMBER_RO": { "summary": "Returns members from a geospatial index that are within a distance from a member.", "since": "3.2.10", "group": "geo", "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.", "deprecated_since": "6.2.0", "replaced_by": "`GEOSEARCH` with the `BYRADIUS` and `FROMMEMBER` arguments", "acl_categories": [ "@read", "@geo", "@slow" ], "arity": -5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member" }, { "name": "radius", "type": "double", "display_text": "radius" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "display_text": "m", "token": "M" }, { "name": "km", "type": "pure-token", "display_text": "km", "token": "KM" }, { "name": "ft", "type": "pure-token", "display_text": "ft", "token": "FT" }, { "name": "mi", "type": "pure-token", "display_text": "mi", "token": "MI" } ] }, { "name": "withcoord", "type": "pure-token", "display_text": "withcoord", "token": "WITHCOORD", "optional": true }, { "name": "withdist", "type": "pure-token", "display_text": "withdist", "token": "WITHDIST", "optional": true }, { "name": "withhash", "type": "pure-token", "display_text": "withhash", "token": "WITHHASH", "optional": true }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT" }, { "name": "any", "type": "pure-token", "display_text": "any", "token": "ANY", "optional": true } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "display_text": "asc", "token": "ASC" }, { "name": "desc", "type": "pure-token", "display_text": "desc", "token": "DESC" } ] } ], "command_flags": [ "readonly" ], "doc_flags": [ "deprecated" ] }, "GEORADIUS_RO": { "summary": "Returns members from a geospatial index that are within a distance from a coordinate.", "since": "3.2.10", "group": "geo", "complexity": "O(N+log(M)) where N is the number of elements inside the bounding box of the circular area delimited by center and radius and M is the number of items inside the index.", "deprecated_since": "6.2.0", "replaced_by": "`GEOSEARCH` with the `BYRADIUS` argument", "history": [ [ "6.2.0", "Added the `ANY` option for `COUNT`." ] ], "acl_categories": [ "@read", "@geo", "@slow" ], "arity": -6, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "longitude", "type": "double", "display_text": "longitude" }, { "name": "latitude", "type": "double", "display_text": "latitude" }, { "name": "radius", "type": "double", "display_text": "radius" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "display_text": "m", "token": "M" }, { "name": "km", "type": "pure-token", "display_text": "km", "token": "KM" }, { "name": "ft", "type": "pure-token", "display_text": "ft", "token": "FT" }, { "name": "mi", "type": "pure-token", "display_text": "mi", "token": "MI" } ] }, { "name": "withcoord", "type": "pure-token", "display_text": "withcoord", "token": "WITHCOORD", "optional": true }, { "name": "withdist", "type": "pure-token", "display_text": "withdist", "token": "WITHDIST", "optional": true }, { "name": "withhash", "type": "pure-token", "display_text": "withhash", "token": "WITHHASH", "optional": true }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT" }, { "name": "any", "type": "pure-token", "display_text": "any", "token": "ANY", "since": "6.2.0", "optional": true } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "display_text": "asc", "token": "ASC" }, { "name": "desc", "type": "pure-token", "display_text": "desc", "token": "DESC" } ] } ], "command_flags": [ "readonly" ], "doc_flags": [ "deprecated" ] }, "GEOSEARCH": { "summary": "Queries a geospatial index for members inside an area of a box or a circle.", "since": "6.2.0", "group": "geo", "complexity": "O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape", "history": [ [ "7.0.0", "Added support for uppercase unit names." ] ], "acl_categories": [ "@read", "@geo", "@slow" ], "arity": -7, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "from", "type": "oneof", "arguments": [ { "name": "member", "type": "string", "display_text": "member", "token": "FROMMEMBER" }, { "name": "fromlonlat", "type": "block", "token": "FROMLONLAT", "arguments": [ { "name": "longitude", "type": "double", "display_text": "longitude" }, { "name": "latitude", "type": "double", "display_text": "latitude" } ] } ] }, { "name": "by", "type": "oneof", "arguments": [ { "name": "circle", "type": "block", "arguments": [ { "name": "radius", "type": "double", "display_text": "radius", "token": "BYRADIUS" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "display_text": "m", "token": "M" }, { "name": "km", "type": "pure-token", "display_text": "km", "token": "KM" }, { "name": "ft", "type": "pure-token", "display_text": "ft", "token": "FT" }, { "name": "mi", "type": "pure-token", "display_text": "mi", "token": "MI" } ] } ] }, { "name": "box", "type": "block", "arguments": [ { "name": "width", "type": "double", "display_text": "width", "token": "BYBOX" }, { "name": "height", "type": "double", "display_text": "height" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "display_text": "m", "token": "M" }, { "name": "km", "type": "pure-token", "display_text": "km", "token": "KM" }, { "name": "ft", "type": "pure-token", "display_text": "ft", "token": "FT" }, { "name": "mi", "type": "pure-token", "display_text": "mi", "token": "MI" } ] } ] } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "display_text": "asc", "token": "ASC" }, { "name": "desc", "type": "pure-token", "display_text": "desc", "token": "DESC" } ] }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT" }, { "name": "any", "type": "pure-token", "display_text": "any", "token": "ANY", "optional": true } ] }, { "name": "withcoord", "type": "pure-token", "display_text": "withcoord", "token": "WITHCOORD", "optional": true }, { "name": "withdist", "type": "pure-token", "display_text": "withdist", "token": "WITHDIST", "optional": true }, { "name": "withhash", "type": "pure-token", "display_text": "withhash", "token": "WITHHASH", "optional": true } ], "command_flags": [ "readonly" ] }, "GEOSEARCHSTORE": { "summary": "Queries a geospatial index for members inside an area of a box or a circle, optionally stores the result.", "since": "6.2.0", "group": "geo", "complexity": "O(N+log(M)) where N is the number of elements in the grid-aligned bounding box area around the shape provided as the filter and M is the number of items inside the shape", "history": [ [ "7.0.0", "Added support for uppercase unit names." ] ], "acl_categories": [ "@write", "@geo", "@slow" ], "arity": -8, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 0 }, { "name": "source", "type": "key", "display_text": "source", "key_spec_index": 1 }, { "name": "from", "type": "oneof", "arguments": [ { "name": "member", "type": "string", "display_text": "member", "token": "FROMMEMBER" }, { "name": "fromlonlat", "type": "block", "token": "FROMLONLAT", "arguments": [ { "name": "longitude", "type": "double", "display_text": "longitude" }, { "name": "latitude", "type": "double", "display_text": "latitude" } ] } ] }, { "name": "by", "type": "oneof", "arguments": [ { "name": "circle", "type": "block", "arguments": [ { "name": "radius", "type": "double", "display_text": "radius", "token": "BYRADIUS" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "display_text": "m", "token": "M" }, { "name": "km", "type": "pure-token", "display_text": "km", "token": "KM" }, { "name": "ft", "type": "pure-token", "display_text": "ft", "token": "FT" }, { "name": "mi", "type": "pure-token", "display_text": "mi", "token": "MI" } ] } ] }, { "name": "box", "type": "block", "arguments": [ { "name": "width", "type": "double", "display_text": "width", "token": "BYBOX" }, { "name": "height", "type": "double", "display_text": "height" }, { "name": "unit", "type": "oneof", "arguments": [ { "name": "m", "type": "pure-token", "display_text": "m", "token": "M" }, { "name": "km", "type": "pure-token", "display_text": "km", "token": "KM" }, { "name": "ft", "type": "pure-token", "display_text": "ft", "token": "FT" }, { "name": "mi", "type": "pure-token", "display_text": "mi", "token": "MI" } ] } ] } ] }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "display_text": "asc", "token": "ASC" }, { "name": "desc", "type": "pure-token", "display_text": "desc", "token": "DESC" } ] }, { "name": "count-block", "type": "block", "optional": true, "arguments": [ { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT" }, { "name": "any", "type": "pure-token", "display_text": "any", "token": "ANY", "optional": true } ] }, { "name": "storedist", "type": "pure-token", "display_text": "storedist", "token": "STOREDIST", "optional": true } ], "command_flags": [ "write", "denyoom" ] }, "GET": { "summary": "Returns the string value of a key.", "since": "1.0.0", "group": "string", "complexity": "O(1)", "acl_categories": [ "@read", "@string", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ] }, "GETBIT": { "summary": "Returns a bit value by offset.", "since": "2.2.0", "group": "bitmap", "complexity": "O(1)", "acl_categories": [ "@read", "@bitmap", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "offset", "type": "integer", "display_text": "offset" } ], "command_flags": [ "readonly", "fast" ] }, "GETDEL": { "summary": "Returns the string value of a key after deleting the key.", "since": "6.2.0", "group": "string", "complexity": "O(1)", "acl_categories": [ "@write", "@string", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "write", "fast" ] }, "GETEX": { "summary": "Returns the string value of a key after setting its expiration time.", "since": "6.2.0", "group": "string", "complexity": "O(1)", "acl_categories": [ "@write", "@string", "@fast" ], "arity": -2, "key_specs": [ { "notes": "RW and UPDATE because it changes the TTL", "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "expiration", "type": "oneof", "optional": true, "arguments": [ { "name": "seconds", "type": "integer", "display_text": "seconds", "token": "EX" }, { "name": "milliseconds", "type": "integer", "display_text": "milliseconds", "token": "PX" }, { "name": "unix-time-seconds", "type": "unix-time", "display_text": "unix-time-seconds", "token": "EXAT" }, { "name": "unix-time-milliseconds", "type": "unix-time", "display_text": "unix-time-milliseconds", "token": "PXAT" }, { "name": "persist", "type": "pure-token", "display_text": "persist", "token": "PERSIST" } ] } ], "command_flags": [ "write", "fast" ] }, "GETRANGE": { "summary": "Returns a substring of the string stored at a key.", "since": "2.4.0", "group": "string", "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.", "acl_categories": [ "@read", "@string", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer", "display_text": "start" }, { "name": "end", "type": "integer", "display_text": "end" } ], "command_flags": [ "readonly" ] }, "GETSET": { "summary": "Returns the previous string value of a key after setting it to a new value.", "since": "1.0.0", "group": "string", "complexity": "O(1)", "deprecated_since": "6.2.0", "replaced_by": "`SET` with the `!GET` argument", "acl_categories": [ "@write", "@string", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "value", "type": "string", "display_text": "value" } ], "command_flags": [ "write", "denyoom", "fast" ], "doc_flags": [ "deprecated" ] }, "HDEL": { "summary": "Deletes one or more fields and their values from a hash. Deletes the hash if no fields remain.", "since": "2.0.0", "group": "hash", "complexity": "O(N) where N is the number of fields to be removed.", "history": [ [ "2.4.0", "Accepts multiple `field` arguments." ] ], "acl_categories": [ "@write", "@hash", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "field", "type": "string", "display_text": "field", "multiple": true } ], "command_flags": [ "write", "fast" ] }, "HELLO": { "summary": "Handshakes with the Redis server.", "since": "6.0.0", "group": "connection", "complexity": "O(1)", "history": [ [ "6.2.0", "`protover` made optional; when called without arguments the command reports the current connection's context." ] ], "acl_categories": [ "@fast", "@connection" ], "arity": -1, "arguments": [ { "name": "arguments", "type": "block", "optional": true, "arguments": [ { "name": "protover", "type": "integer", "display_text": "protover" }, { "name": "auth", "type": "block", "token": "AUTH", "optional": true, "arguments": [ { "name": "username", "type": "string", "display_text": "username" }, { "name": "password", "type": "string", "display_text": "password" } ] }, { "name": "clientname", "type": "string", "display_text": "clientname", "token": "SETNAME", "optional": true } ] } ], "command_flags": [ "noscript", "loading", "stale", "fast", "no_auth", "allow_busy" ] }, "HEXISTS": { "summary": "Determines whether a field exists in a hash.", "since": "2.0.0", "group": "hash", "complexity": "O(1)", "acl_categories": [ "@read", "@hash", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "field", "type": "string", "display_text": "field" } ], "command_flags": [ "readonly", "fast" ] }, "HGET": { "summary": "Returns the value of a field in a hash.", "since": "2.0.0", "group": "hash", "complexity": "O(1)", "acl_categories": [ "@read", "@hash", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "field", "type": "string", "display_text": "field" } ], "command_flags": [ "readonly", "fast" ] }, "HGETALL": { "summary": "Returns all fields and values in a hash.", "since": "2.0.0", "group": "hash", "complexity": "O(N) where N is the size of the hash.", "acl_categories": [ "@read", "@hash", "@slow" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output_order" ] }, "HINCRBY": { "summary": "Increments the integer value of a field in a hash by a number. Uses 0 as initial value if the field doesn't exist.", "since": "2.0.0", "group": "hash", "complexity": "O(1)", "acl_categories": [ "@write", "@hash", "@fast" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "field", "type": "string", "display_text": "field" }, { "name": "increment", "type": "integer", "display_text": "increment" } ], "command_flags": [ "write", "denyoom", "fast" ] }, "HINCRBYFLOAT": { "summary": "Increments the floating point value of a field by a number. Uses 0 as initial value if the field doesn't exist.", "since": "2.6.0", "group": "hash", "complexity": "O(1)", "acl_categories": [ "@write", "@hash", "@fast" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "field", "type": "string", "display_text": "field" }, { "name": "increment", "type": "double", "display_text": "increment" } ], "command_flags": [ "write", "denyoom", "fast" ] }, "HKEYS": { "summary": "Returns all fields in a hash.", "since": "2.0.0", "group": "hash", "complexity": "O(N) where N is the size of the hash.", "acl_categories": [ "@read", "@hash", "@slow" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output_order" ] }, "HLEN": { "summary": "Returns the number of fields in a hash.", "since": "2.0.0", "group": "hash", "complexity": "O(1)", "acl_categories": [ "@read", "@hash", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ] }, "HMGET": { "summary": "Returns the values of all fields in a hash.", "since": "2.0.0", "group": "hash", "complexity": "O(N) where N is the number of fields being requested.", "acl_categories": [ "@read", "@hash", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "field", "type": "string", "display_text": "field", "multiple": true } ], "command_flags": [ "readonly", "fast" ] }, "HMSET": { "summary": "Sets the values of multiple fields.", "since": "2.0.0", "group": "hash", "complexity": "O(N) where N is the number of fields being set.", "deprecated_since": "4.0.0", "replaced_by": "`HSET` with multiple field-value pairs", "acl_categories": [ "@write", "@hash", "@fast" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "field", "type": "string", "display_text": "field" }, { "name": "value", "type": "string", "display_text": "value" } ] } ], "command_flags": [ "write", "denyoom", "fast" ], "doc_flags": [ "deprecated" ] }, "HRANDFIELD": { "summary": "Returns one or more random fields from a hash.", "since": "6.2.0", "group": "hash", "complexity": "O(N) where N is the number of fields returned", "acl_categories": [ "@read", "@hash", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "options", "type": "block", "optional": true, "arguments": [ { "name": "count", "type": "integer", "display_text": "count" }, { "name": "withvalues", "type": "pure-token", "display_text": "withvalues", "token": "WITHVALUES", "optional": true } ] } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "HSCAN": { "summary": "Iterates over fields and values of a hash.", "since": "2.8.0", "group": "hash", "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.", "acl_categories": [ "@read", "@hash", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "cursor", "type": "integer", "display_text": "cursor" }, { "name": "pattern", "type": "pattern", "display_text": "pattern", "token": "MATCH", "optional": true }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "HSET": { "summary": "Creates or modifies the value of a field in a hash.", "since": "2.0.0", "group": "hash", "complexity": "O(1) for each field/value pair added, so O(N) to add N field/value pairs when the command is called with multiple field/value pairs.", "history": [ [ "4.0.0", "Accepts multiple `field` and `value` arguments." ] ], "acl_categories": [ "@write", "@hash", "@fast" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "field", "type": "string", "display_text": "field" }, { "name": "value", "type": "string", "display_text": "value" } ] } ], "command_flags": [ "write", "denyoom", "fast" ] }, "HSETNX": { "summary": "Sets the value of a field in a hash only when the field doesn't exist.", "since": "2.0.0", "group": "hash", "complexity": "O(1)", "acl_categories": [ "@write", "@hash", "@fast" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "field", "type": "string", "display_text": "field" }, { "name": "value", "type": "string", "display_text": "value" } ], "command_flags": [ "write", "denyoom", "fast" ] }, "HSTRLEN": { "summary": "Returns the length of the value of a field.", "since": "3.2.0", "group": "hash", "complexity": "O(1)", "acl_categories": [ "@read", "@hash", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "field", "type": "string", "display_text": "field" } ], "command_flags": [ "readonly", "fast" ] }, "HVALS": { "summary": "Returns all values in a hash.", "since": "2.0.0", "group": "hash", "complexity": "O(N) where N is the size of the hash.", "acl_categories": [ "@read", "@hash", "@slow" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output_order" ] }, "INCR": { "summary": "Increments the integer value of a key by one. Uses 0 as initial value if the key doesn't exist.", "since": "1.0.0", "group": "string", "complexity": "O(1)", "acl_categories": [ "@write", "@string", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "write", "denyoom", "fast" ] }, "INCRBY": { "summary": "Increments the integer value of a key by a number. Uses 0 as initial value if the key doesn't exist.", "since": "1.0.0", "group": "string", "complexity": "O(1)", "acl_categories": [ "@write", "@string", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "increment", "type": "integer", "display_text": "increment" } ], "command_flags": [ "write", "denyoom", "fast" ] }, "INCRBYFLOAT": { "summary": "Increment the floating point value of a key by a number. Uses 0 as initial value if the key doesn't exist.", "since": "2.6.0", "group": "string", "complexity": "O(1)", "acl_categories": [ "@write", "@string", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "increment", "type": "double", "display_text": "increment" } ], "command_flags": [ "write", "denyoom", "fast" ] }, "INFO": { "summary": "Returns information and statistics about the server.", "since": "1.0.0", "group": "server", "complexity": "O(1)", "history": [ [ "7.0.0", "Added support for taking multiple section arguments." ] ], "acl_categories": [ "@slow", "@dangerous" ], "arity": -1, "arguments": [ { "name": "section", "type": "string", "display_text": "section", "optional": true, "multiple": true } ], "command_flags": [ "loading", "stale" ], "hints": [ "nondeterministic_output", "request_policy:all_shards", "response_policy:special" ] }, "KEYS": { "summary": "Returns all key names that match a pattern.", "since": "1.0.0", "group": "generic", "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.", "acl_categories": [ "@keyspace", "@read", "@slow", "@dangerous" ], "arity": 2, "arguments": [ { "name": "pattern", "type": "pattern", "display_text": "pattern" } ], "command_flags": [ "readonly" ], "hints": [ "request_policy:all_shards", "nondeterministic_output_order" ] }, "LASTSAVE": { "summary": "Returns the Unix timestamp of the last successful save to disk.", "since": "1.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@fast", "@dangerous" ], "arity": 1, "command_flags": [ "loading", "stale", "fast" ], "hints": [ "nondeterministic_output" ] }, "LATENCY": { "summary": "A container for latency diagnostics commands.", "since": "2.8.13", "group": "server", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "LATENCY DOCTOR": { "summary": "Returns a human-readable latency analysis report.", "since": "2.8.13", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "nondeterministic_output", "request_policy:all_nodes", "response_policy:special" ] }, "LATENCY GRAPH": { "summary": "Returns a latency graph for an event.", "since": "2.8.13", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "event", "type": "string", "display_text": "event" } ], "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "nondeterministic_output", "request_policy:all_nodes", "response_policy:special" ] }, "LATENCY HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "2.8.13", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "LATENCY HISTOGRAM": { "summary": "Returns the cumulative distribution of latencies of a subset or all commands.", "since": "7.0.0", "group": "server", "complexity": "O(N) where N is the number of commands with latency information being retrieved.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -2, "arguments": [ { "name": "command", "type": "string", "display_text": "command", "optional": true, "multiple": true } ], "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "nondeterministic_output", "request_policy:all_nodes", "response_policy:special" ] }, "LATENCY HISTORY": { "summary": "Returns timestamp-latency samples for an event.", "since": "2.8.13", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "event", "type": "string", "display_text": "event" } ], "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "nondeterministic_output", "request_policy:all_nodes", "response_policy:special" ] }, "LATENCY LATEST": { "summary": "Returns the latest latency samples for all events.", "since": "2.8.13", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "nondeterministic_output", "request_policy:all_nodes", "response_policy:special" ] }, "LATENCY RESET": { "summary": "Resets the latency data for one or more events.", "since": "2.8.13", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -2, "arguments": [ { "name": "event", "type": "string", "display_text": "event", "optional": true, "multiple": true } ], "command_flags": [ "admin", "noscript", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:agg_sum" ] }, "LCS": { "summary": "Finds the longest common substring.", "since": "7.0.0", "group": "string", "complexity": "O(N*M) where N and M are the lengths of s1 and s2, respectively", "acl_categories": [ "@read", "@string", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 1, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key1", "type": "key", "display_text": "key1", "key_spec_index": 0 }, { "name": "key2", "type": "key", "display_text": "key2", "key_spec_index": 0 }, { "name": "len", "type": "pure-token", "display_text": "len", "token": "LEN", "optional": true }, { "name": "idx", "type": "pure-token", "display_text": "idx", "token": "IDX", "optional": true }, { "name": "min-match-len", "type": "integer", "display_text": "min-match-len", "token": "MINMATCHLEN", "optional": true }, { "name": "withmatchlen", "type": "pure-token", "display_text": "withmatchlen", "token": "WITHMATCHLEN", "optional": true } ], "command_flags": [ "readonly" ] }, "LINDEX": { "summary": "Returns an element from a list by its index.", "since": "1.0.0", "group": "list", "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).", "acl_categories": [ "@read", "@list", "@slow" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "index", "type": "integer", "display_text": "index" } ], "command_flags": [ "readonly" ] }, "LINSERT": { "summary": "Inserts an element before or after another element in a list.", "since": "2.2.0", "group": "list", "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).", "acl_categories": [ "@write", "@list", "@slow" ], "arity": 5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "where", "type": "oneof", "arguments": [ { "name": "before", "type": "pure-token", "display_text": "before", "token": "BEFORE" }, { "name": "after", "type": "pure-token", "display_text": "after", "token": "AFTER" } ] }, { "name": "pivot", "type": "string", "display_text": "pivot" }, { "name": "element", "type": "string", "display_text": "element" } ], "command_flags": [ "write", "denyoom" ] }, "LLEN": { "summary": "Returns the length of a list.", "since": "1.0.0", "group": "list", "complexity": "O(1)", "acl_categories": [ "@read", "@list", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ] }, "LMOVE": { "summary": "Returns an element after popping it from one list and pushing it to another. Deletes the list if the last element was moved.", "since": "6.2.0", "group": "list", "complexity": "O(1)", "acl_categories": [ "@write", "@list", "@slow" ], "arity": 5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "source", "type": "key", "display_text": "source", "key_spec_index": 0 }, { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 1 }, { "name": "wherefrom", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "display_text": "left", "token": "LEFT" }, { "name": "right", "type": "pure-token", "display_text": "right", "token": "RIGHT" } ] }, { "name": "whereto", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "display_text": "left", "token": "LEFT" }, { "name": "right", "type": "pure-token", "display_text": "right", "token": "RIGHT" } ] } ], "command_flags": [ "write", "denyoom" ] }, "LMPOP": { "summary": "Returns multiple elements from a list after removing them. Deletes the list if the last element was popped.", "since": "7.0.0", "group": "list", "complexity": "O(N+M) where N is the number of provided keys and M is the number of elements returned.", "acl_categories": [ "@write", "@list", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "where", "type": "oneof", "arguments": [ { "name": "left", "type": "pure-token", "display_text": "left", "token": "LEFT" }, { "name": "right", "type": "pure-token", "display_text": "right", "token": "RIGHT" } ] }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true } ], "command_flags": [ "write", "movablekeys" ] }, "LOLWUT": { "summary": "Displays computer art and the Redis version", "since": "5.0.0", "group": "server", "acl_categories": [ "@read", "@fast" ], "arity": -1, "arguments": [ { "name": "version", "type": "integer", "display_text": "version", "token": "VERSION", "optional": true } ], "command_flags": [ "readonly", "fast" ] }, "LPOP": { "summary": "Returns the first elements in a list after removing it. Deletes the list if the last element was popped.", "since": "1.0.0", "group": "list", "complexity": "O(N) where N is the number of elements returned", "history": [ [ "6.2.0", "Added the `count` argument." ] ], "acl_categories": [ "@write", "@list", "@fast" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "display_text": "count", "since": "6.2.0", "optional": true } ], "command_flags": [ "write", "fast" ] }, "LPOS": { "summary": "Returns the index of matching elements in a list.", "since": "6.0.6", "group": "list", "complexity": "O(N) where N is the number of elements in the list, for the average case. When searching for elements near the head or the tail of the list, or when the MAXLEN option is provided, the command may run in constant time.", "acl_categories": [ "@read", "@list", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "element", "type": "string", "display_text": "element" }, { "name": "rank", "type": "integer", "display_text": "rank", "token": "RANK", "optional": true }, { "name": "num-matches", "type": "integer", "display_text": "num-matches", "token": "COUNT", "optional": true }, { "name": "len", "type": "integer", "display_text": "len", "token": "MAXLEN", "optional": true } ], "command_flags": [ "readonly" ] }, "LPUSH": { "summary": "Prepends one or more elements to a list. Creates the key if it doesn't exist.", "since": "1.0.0", "group": "list", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "history": [ [ "2.4.0", "Accepts multiple `element` arguments." ] ], "acl_categories": [ "@write", "@list", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "element", "type": "string", "display_text": "element", "multiple": true } ], "command_flags": [ "write", "denyoom", "fast" ] }, "LPUSHX": { "summary": "Prepends one or more elements to a list only when the list exists.", "since": "2.2.0", "group": "list", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "history": [ [ "4.0.0", "Accepts multiple `element` arguments." ] ], "acl_categories": [ "@write", "@list", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "element", "type": "string", "display_text": "element", "multiple": true } ], "command_flags": [ "write", "denyoom", "fast" ] }, "LRANGE": { "summary": "Returns a range of elements from a list.", "since": "1.0.0", "group": "list", "complexity": "O(S+N) where S is the distance of start offset from HEAD for small lists, from nearest end (HEAD or TAIL) for large lists; and N is the number of elements in the specified range.", "acl_categories": [ "@read", "@list", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer", "display_text": "start" }, { "name": "stop", "type": "integer", "display_text": "stop" } ], "command_flags": [ "readonly" ] }, "LREM": { "summary": "Removes elements from a list. Deletes the list if the last element was removed.", "since": "1.0.0", "group": "list", "complexity": "O(N+M) where N is the length of the list and M is the number of elements removed.", "acl_categories": [ "@write", "@list", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "display_text": "count" }, { "name": "element", "type": "string", "display_text": "element" } ], "command_flags": [ "write" ] }, "LSET": { "summary": "Sets the value of an element in a list by its index.", "since": "1.0.0", "group": "list", "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).", "acl_categories": [ "@write", "@list", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "index", "type": "integer", "display_text": "index" }, { "name": "element", "type": "string", "display_text": "element" } ], "command_flags": [ "write", "denyoom" ] }, "LTRIM": { "summary": "Removes elements from both ends a list. Deletes the list if all elements were trimmed.", "since": "1.0.0", "group": "list", "complexity": "O(N) where N is the number of elements to be removed by the operation.", "acl_categories": [ "@write", "@list", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer", "display_text": "start" }, { "name": "stop", "type": "integer", "display_text": "stop" } ], "command_flags": [ "write" ] }, "MEMORY": { "summary": "A container for memory diagnostics commands.", "since": "4.0.0", "group": "server", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "MEMORY DOCTOR": { "summary": "Outputs a memory problems report.", "since": "4.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "hints": [ "nondeterministic_output", "request_policy:all_shards", "response_policy:special" ] }, "MEMORY HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "4.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "MEMORY MALLOC-STATS": { "summary": "Returns the allocator statistics.", "since": "4.0.0", "group": "server", "complexity": "Depends on how much memory is allocated, could be slow", "acl_categories": [ "@slow" ], "arity": 2, "hints": [ "nondeterministic_output", "request_policy:all_shards", "response_policy:special" ] }, "MEMORY PURGE": { "summary": "Asks the allocator to release memory.", "since": "4.0.0", "group": "server", "complexity": "Depends on how much memory is allocated, could be slow", "acl_categories": [ "@slow" ], "arity": 2, "hints": [ "request_policy:all_shards", "response_policy:all_succeeded" ] }, "MEMORY STATS": { "summary": "Returns details about memory usage.", "since": "4.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "hints": [ "nondeterministic_output", "request_policy:all_shards", "response_policy:special" ] }, "MEMORY USAGE": { "summary": "Estimates the memory usage of a key.", "since": "4.0.0", "group": "server", "complexity": "O(N) where N is the number of samples.", "acl_categories": [ "@read", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "display_text": "count", "token": "SAMPLES", "optional": true } ], "command_flags": [ "readonly" ] }, "MGET": { "summary": "Atomically returns the string values of one or more keys.", "since": "1.0.0", "group": "string", "complexity": "O(N) where N is the number of keys to retrieve.", "acl_categories": [ "@read", "@string", "@fast" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true } ], "command_flags": [ "readonly", "fast" ], "hints": [ "request_policy:multi_shard" ] }, "MIGRATE": { "summary": "Atomically transfers a key from one Redis instance to another.", "since": "2.6.0", "group": "generic", "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.", "history": [ [ "3.0.0", "Added the `COPY` and `REPLACE` options." ], [ "3.0.6", "Added the `KEYS` option." ], [ "4.0.7", "Added the `AUTH` option." ], [ "6.0.0", "Added the `AUTH2` option." ] ], "acl_categories": [ "@keyspace", "@write", "@slow", "@dangerous" ], "arity": -6, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 3 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true }, { "begin_search": { "type": "keyword", "spec": { "keyword": "KEYS", "startfrom": -2 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true, "incomplete": true } ], "arguments": [ { "name": "host", "type": "string", "display_text": "host" }, { "name": "port", "type": "integer", "display_text": "port" }, { "name": "key-selector", "type": "oneof", "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "empty-string", "type": "pure-token", "display_text": "empty-string", "token": "" } ] }, { "name": "destination-db", "type": "integer", "display_text": "destination-db" }, { "name": "timeout", "type": "integer", "display_text": "timeout" }, { "name": "copy", "type": "pure-token", "display_text": "copy", "token": "COPY", "since": "3.0.0", "optional": true }, { "name": "replace", "type": "pure-token", "display_text": "replace", "token": "REPLACE", "since": "3.0.0", "optional": true }, { "name": "authentication", "type": "oneof", "optional": true, "arguments": [ { "name": "auth", "type": "string", "display_text": "password", "token": "AUTH", "since": "4.0.7" }, { "name": "auth2", "type": "block", "token": "AUTH2", "since": "6.0.0", "arguments": [ { "name": "username", "type": "string", "display_text": "username" }, { "name": "password", "type": "string", "display_text": "password" } ] } ] }, { "name": "keys", "type": "key", "display_text": "key", "key_spec_index": 1, "token": "KEYS", "since": "3.0.6", "optional": true, "multiple": true } ], "command_flags": [ "write", "movablekeys" ], "hints": [ "nondeterministic_output" ] }, "MODULE": { "summary": "A container for module commands.", "since": "4.0.0", "group": "server", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "MODULE HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "5.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "MODULE LIST": { "summary": "Returns all loaded modules.", "since": "4.0.0", "group": "server", "complexity": "O(N) where N is the number of loaded modules.", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "noscript" ], "hints": [ "nondeterministic_output_order" ] }, "MODULE LOAD": { "summary": "Loads a module.", "since": "4.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -3, "arguments": [ { "name": "path", "type": "string", "display_text": "path" }, { "name": "arg", "type": "string", "display_text": "arg", "optional": true, "multiple": true } ], "command_flags": [ "admin", "noscript", "no_async_loading" ] }, "MODULE LOADEX": { "summary": "Loads a module using extended parameters.", "since": "7.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -3, "arguments": [ { "name": "path", "type": "string", "display_text": "path" }, { "name": "configs", "type": "block", "token": "CONFIG", "optional": true, "multiple": true, "multiple_token": true, "arguments": [ { "name": "name", "type": "string", "display_text": "name" }, { "name": "value", "type": "string", "display_text": "value" } ] }, { "name": "args", "type": "string", "display_text": "args", "token": "ARGS", "optional": true, "multiple": true } ], "command_flags": [ "admin", "noscript", "no_async_loading" ] }, "MODULE UNLOAD": { "summary": "Unloads a module.", "since": "4.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "name", "type": "string", "display_text": "name" } ], "command_flags": [ "admin", "noscript", "no_async_loading" ] }, "MONITOR": { "summary": "Listens for all requests received by the server in real-time.", "since": "1.0.0", "group": "server", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 1, "command_flags": [ "admin", "noscript", "loading", "stale" ] }, "MOVE": { "summary": "Moves a key to another database.", "since": "1.0.0", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@write", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "db", "type": "integer", "display_text": "db" } ], "command_flags": [ "write", "fast" ] }, "MSET": { "summary": "Atomically creates or modifies the string values of one or more keys.", "since": "1.0.1", "group": "string", "complexity": "O(N) where N is the number of keys to set.", "acl_categories": [ "@write", "@string", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 2, "limit": 0 } }, "OW": true, "update": true } ], "arguments": [ { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "value", "type": "string", "display_text": "value" } ] } ], "command_flags": [ "write", "denyoom" ], "hints": [ "request_policy:multi_shard", "response_policy:all_succeeded" ] }, "MSETNX": { "summary": "Atomically modifies the string values of one or more keys only when all keys don't exist.", "since": "1.0.1", "group": "string", "complexity": "O(N) where N is the number of keys to set.", "acl_categories": [ "@write", "@string", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 2, "limit": 0 } }, "OW": true, "insert": true } ], "arguments": [ { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "value", "type": "string", "display_text": "value" } ] } ], "command_flags": [ "write", "denyoom" ] }, "MULTI": { "summary": "Starts a transaction.", "since": "1.2.0", "group": "transactions", "complexity": "O(1)", "acl_categories": [ "@fast", "@transaction" ], "arity": 1, "command_flags": [ "noscript", "loading", "stale", "fast", "allow_busy" ] }, "OBJECT": { "summary": "A container for object introspection commands.", "since": "2.2.3", "group": "generic", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "OBJECT ENCODING": { "summary": "Returns the internal encoding of a Redis object.", "since": "2.2.3", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@read", "@slow" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "OBJECT FREQ": { "summary": "Returns the logarithmic access frequency counter of a Redis object.", "since": "4.0.0", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@read", "@slow" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "OBJECT HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "6.2.0", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "OBJECT IDLETIME": { "summary": "Returns the time since the last access to a Redis object.", "since": "2.2.3", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@read", "@slow" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "OBJECT REFCOUNT": { "summary": "Returns the reference count of a value of a key.", "since": "2.2.3", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@read", "@slow" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "PERSIST": { "summary": "Removes the expiration time of a key.", "since": "2.2.0", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@write", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "write", "fast" ] }, "PEXPIRE": { "summary": "Sets the expiration time of a key in milliseconds.", "since": "2.6.0", "group": "generic", "complexity": "O(1)", "history": [ [ "7.0.0", "Added options: `NX`, `XX`, `GT` and `LT`." ] ], "acl_categories": [ "@keyspace", "@write", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "milliseconds", "type": "integer", "display_text": "milliseconds" }, { "name": "condition", "type": "oneof", "since": "7.0.0", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "display_text": "nx", "token": "NX" }, { "name": "xx", "type": "pure-token", "display_text": "xx", "token": "XX" }, { "name": "gt", "type": "pure-token", "display_text": "gt", "token": "GT" }, { "name": "lt", "type": "pure-token", "display_text": "lt", "token": "LT" } ] } ], "command_flags": [ "write", "fast" ] }, "PEXPIREAT": { "summary": "Sets the expiration time of a key to a Unix milliseconds timestamp.", "since": "2.6.0", "group": "generic", "complexity": "O(1)", "history": [ [ "7.0.0", "Added options: `NX`, `XX`, `GT` and `LT`." ] ], "acl_categories": [ "@keyspace", "@write", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "unix-time-milliseconds", "type": "unix-time", "display_text": "unix-time-milliseconds" }, { "name": "condition", "type": "oneof", "since": "7.0.0", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "display_text": "nx", "token": "NX" }, { "name": "xx", "type": "pure-token", "display_text": "xx", "token": "XX" }, { "name": "gt", "type": "pure-token", "display_text": "gt", "token": "GT" }, { "name": "lt", "type": "pure-token", "display_text": "lt", "token": "LT" } ] } ], "command_flags": [ "write", "fast" ] }, "PEXPIRETIME": { "summary": "Returns the expiration time of a key as a Unix milliseconds timestamp.", "since": "7.0.0", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@read", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ] }, "PFADD": { "summary": "Adds elements to a HyperLogLog key. Creates the key if it doesn't exist.", "since": "2.8.9", "group": "hyperloglog", "complexity": "O(1) to add every element.", "acl_categories": [ "@write", "@hyperloglog", "@fast" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "element", "type": "string", "display_text": "element", "optional": true, "multiple": true } ], "command_flags": [ "write", "denyoom", "fast" ] }, "PFCOUNT": { "summary": "Returns the approximated cardinality of the set(s) observed by the HyperLogLog key(s).", "since": "2.8.9", "group": "hyperloglog", "complexity": "O(1) with a very small average constant time when called with a single key. O(N) with N being the number of keys, and much bigger constant times, when called with multiple keys.", "acl_categories": [ "@read", "@hyperloglog", "@slow" ], "arity": -2, "key_specs": [ { "notes": "RW because it may change the internal representation of the key, and propagate to replicas", "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RW": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true } ], "command_flags": [ "readonly" ] }, "PFDEBUG": { "summary": "Internal commands for debugging HyperLogLog values.", "since": "2.8.9", "group": "hyperloglog", "complexity": "N/A", "acl_categories": [ "@write", "@hyperloglog", "@admin", "@slow", "@dangerous" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true } ], "arguments": [ { "name": "subcommand", "type": "string", "display_text": "subcommand" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "write", "denyoom", "admin" ], "doc_flags": [ "syscmd" ] }, "PFMERGE": { "summary": "Merges one or more HyperLogLog values into a single key.", "since": "2.8.9", "group": "hyperloglog", "complexity": "O(N) to merge N HyperLogLogs, but with high constant times.", "acl_categories": [ "@write", "@hyperloglog", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "insert": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "destkey", "type": "key", "display_text": "destkey", "key_spec_index": 0 }, { "name": "sourcekey", "type": "key", "display_text": "sourcekey", "key_spec_index": 1, "optional": true, "multiple": true } ], "command_flags": [ "write", "denyoom" ] }, "PFSELFTEST": { "summary": "An internal command for testing HyperLogLog values.", "since": "2.8.9", "group": "hyperloglog", "complexity": "N/A", "acl_categories": [ "@hyperloglog", "@admin", "@slow", "@dangerous" ], "arity": 1, "command_flags": [ "admin" ], "doc_flags": [ "syscmd" ] }, "PING": { "summary": "Returns the server's liveliness response.", "since": "1.0.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@fast", "@connection" ], "arity": -1, "arguments": [ { "name": "message", "type": "string", "display_text": "message", "optional": true } ], "command_flags": [ "fast" ], "hints": [ "request_policy:all_shards", "response_policy:all_succeeded" ] }, "PSETEX": { "summary": "Sets both string value and expiration time in milliseconds of a key. The key is created if it doesn't exist.", "since": "2.6.0", "group": "string", "complexity": "O(1)", "deprecated_since": "2.6.12", "replaced_by": "`SET` with the `PX` argument", "acl_categories": [ "@write", "@string", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "milliseconds", "type": "integer", "display_text": "milliseconds" }, { "name": "value", "type": "string", "display_text": "value" } ], "command_flags": [ "write", "denyoom" ], "doc_flags": [ "deprecated" ] }, "PSUBSCRIBE": { "summary": "Listens for messages published to channels that match one or more patterns.", "since": "2.0.0", "group": "pubsub", "complexity": "O(N) where N is the number of patterns to subscribe to.", "acl_categories": [ "@pubsub", "@slow" ], "arity": -2, "arguments": [ { "name": "pattern", "type": "pattern", "display_text": "pattern", "multiple": true } ], "command_flags": [ "pubsub", "noscript", "loading", "stale" ] }, "PSYNC": { "summary": "An internal command used in replication.", "since": "2.8.0", "group": "server", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -3, "arguments": [ { "name": "replicationid", "type": "string", "display_text": "replicationid" }, { "name": "offset", "type": "integer", "display_text": "offset" } ], "command_flags": [ "admin", "noscript", "no_async_loading", "no_multi" ] }, "PTTL": { "summary": "Returns the expiration time in milliseconds of a key.", "since": "2.6.0", "group": "generic", "complexity": "O(1)", "history": [ [ "2.8.0", "Added the -2 reply." ] ], "acl_categories": [ "@keyspace", "@read", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ], "hints": [ "nondeterministic_output" ] }, "PUBLISH": { "summary": "Posts a message to a channel.", "since": "2.0.0", "group": "pubsub", "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).", "acl_categories": [ "@pubsub", "@fast" ], "arity": 3, "arguments": [ { "name": "channel", "type": "string", "display_text": "channel" }, { "name": "message", "type": "string", "display_text": "message" } ], "command_flags": [ "pubsub", "loading", "stale", "fast" ] }, "PUBSUB": { "summary": "A container for Pub/Sub commands.", "since": "2.8.0", "group": "pubsub", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "PUBSUB CHANNELS": { "summary": "Returns the active channels.", "since": "2.8.0", "group": "pubsub", "complexity": "O(N) where N is the number of active channels, and assuming constant time pattern matching (relatively short channels and patterns)", "acl_categories": [ "@pubsub", "@slow" ], "arity": -2, "arguments": [ { "name": "pattern", "type": "pattern", "display_text": "pattern", "optional": true } ], "command_flags": [ "pubsub", "loading", "stale" ] }, "PUBSUB HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "6.2.0", "group": "pubsub", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "PUBSUB NUMPAT": { "summary": "Returns a count of unique pattern subscriptions.", "since": "2.8.0", "group": "pubsub", "complexity": "O(1)", "acl_categories": [ "@pubsub", "@slow" ], "arity": 2, "command_flags": [ "pubsub", "loading", "stale" ] }, "PUBSUB NUMSUB": { "summary": "Returns a count of subscribers to channels.", "since": "2.8.0", "group": "pubsub", "complexity": "O(N) for the NUMSUB subcommand, where N is the number of requested channels", "acl_categories": [ "@pubsub", "@slow" ], "arity": -2, "arguments": [ { "name": "channel", "type": "string", "display_text": "channel", "optional": true, "multiple": true } ], "command_flags": [ "pubsub", "loading", "stale" ] }, "PUBSUB SHARDCHANNELS": { "summary": "Returns the active shard channels.", "since": "7.0.0", "group": "pubsub", "complexity": "O(N) where N is the number of active shard channels, and assuming constant time pattern matching (relatively short shard channels).", "acl_categories": [ "@pubsub", "@slow" ], "arity": -2, "arguments": [ { "name": "pattern", "type": "pattern", "display_text": "pattern", "optional": true } ], "command_flags": [ "pubsub", "loading", "stale" ] }, "PUBSUB SHARDNUMSUB": { "summary": "Returns the count of subscribers of shard channels.", "since": "7.0.0", "group": "pubsub", "complexity": "O(N) for the SHARDNUMSUB subcommand, where N is the number of requested shard channels", "acl_categories": [ "@pubsub", "@slow" ], "arity": -2, "arguments": [ { "name": "shardchannel", "type": "string", "display_text": "shardchannel", "optional": true, "multiple": true } ], "command_flags": [ "pubsub", "loading", "stale" ] }, "PUNSUBSCRIBE": { "summary": "Stops listening to messages published to channels that match one or more patterns.", "since": "2.0.0", "group": "pubsub", "complexity": "O(N) where N is the number of patterns to unsubscribe.", "acl_categories": [ "@pubsub", "@slow" ], "arity": -1, "arguments": [ { "name": "pattern", "type": "pattern", "display_text": "pattern", "optional": true, "multiple": true } ], "command_flags": [ "pubsub", "noscript", "loading", "stale" ] }, "QUIT": { "summary": "Closes the connection.", "since": "1.0.0", "group": "connection", "complexity": "O(1)", "deprecated_since": "7.2.0", "replaced_by": "just closing the connection", "acl_categories": [ "@fast", "@connection" ], "arity": -1, "command_flags": [ "noscript", "loading", "stale", "fast", "no_auth", "allow_busy" ], "doc_flags": [ "deprecated" ] }, "RANDOMKEY": { "summary": "Returns a random key name from the database.", "since": "1.0.0", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@read", "@slow" ], "arity": 1, "command_flags": [ "readonly" ], "hints": [ "request_policy:all_shards", "response_policy:special", "nondeterministic_output" ] }, "READONLY": { "summary": "Enables read-only queries for a connection to a Redis Cluster replica node.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@fast", "@connection" ], "arity": 1, "command_flags": [ "loading", "stale", "fast" ] }, "READWRITE": { "summary": "Enables read-write queries for a connection to a Reids Cluster replica node.", "since": "3.0.0", "group": "cluster", "complexity": "O(1)", "acl_categories": [ "@fast", "@connection" ], "arity": 1, "command_flags": [ "loading", "stale", "fast" ] }, "RENAME": { "summary": "Renames a key and overwrites the destination.", "since": "1.0.0", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@write", "@slow" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "newkey", "type": "key", "display_text": "newkey", "key_spec_index": 1 } ], "command_flags": [ "write" ] }, "RENAMENX": { "summary": "Renames a key only when the target key name doesn't exist.", "since": "1.0.0", "group": "generic", "complexity": "O(1)", "history": [ [ "3.2.0", "The command no longer returns an error when source and destination names are the same." ] ], "acl_categories": [ "@keyspace", "@write", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "newkey", "type": "key", "display_text": "newkey", "key_spec_index": 1 } ], "command_flags": [ "write", "fast" ] }, "REPLCONF": { "summary": "An internal command for configuring the replication stream.", "since": "3.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -1, "command_flags": [ "admin", "noscript", "loading", "stale", "allow_busy" ], "doc_flags": [ "syscmd" ] }, "REPLICAOF": { "summary": "Configures a server as replica of another, or promotes it to a master.", "since": "5.0.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "args", "type": "oneof", "arguments": [ { "name": "host-port", "type": "block", "arguments": [ { "name": "host", "type": "string", "display_text": "host" }, { "name": "port", "type": "integer", "display_text": "port" } ] }, { "name": "no-one", "type": "block", "arguments": [ { "name": "no", "type": "pure-token", "display_text": "no", "token": "NO" }, { "name": "one", "type": "pure-token", "display_text": "one", "token": "ONE" } ] } ] } ], "command_flags": [ "admin", "noscript", "stale", "no_async_loading" ] }, "RESET": { "summary": "Resets the connection.", "since": "6.2.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@fast", "@connection" ], "arity": 1, "command_flags": [ "noscript", "loading", "stale", "fast", "no_auth", "allow_busy" ] }, "RESTORE": { "summary": "Creates a key from the serialized representation of a value.", "since": "2.6.0", "group": "generic", "complexity": "O(1) to create the new key and additional O(N*M) to reconstruct 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)).", "history": [ [ "3.0.0", "Added the `REPLACE` modifier." ], [ "5.0.0", "Added the `ABSTTL` modifier." ], [ "5.0.0", "Added the `IDLETIME` and `FREQ` options." ] ], "acl_categories": [ "@keyspace", "@write", "@slow", "@dangerous" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "ttl", "type": "integer", "display_text": "ttl" }, { "name": "serialized-value", "type": "string", "display_text": "serialized-value" }, { "name": "replace", "type": "pure-token", "display_text": "replace", "token": "REPLACE", "since": "3.0.0", "optional": true }, { "name": "absttl", "type": "pure-token", "display_text": "absttl", "token": "ABSTTL", "since": "5.0.0", "optional": true }, { "name": "seconds", "type": "integer", "display_text": "seconds", "token": "IDLETIME", "since": "5.0.0", "optional": true }, { "name": "frequency", "type": "integer", "display_text": "frequency", "token": "FREQ", "since": "5.0.0", "optional": true } ], "command_flags": [ "write", "denyoom" ] }, "RESTORE-ASKING": { "summary": "An internal command for migrating keys in a cluster.", "since": "3.0.0", "group": "server", "complexity": "O(1) to create the new key and additional O(N*M) to reconstruct 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)).", "history": [ [ "3.0.0", "Added the `REPLACE` modifier." ], [ "5.0.0", "Added the `ABSTTL` modifier." ], [ "5.0.0", "Added the `IDLETIME` and `FREQ` options." ] ], "acl_categories": [ "@keyspace", "@write", "@slow", "@dangerous" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "ttl", "type": "integer", "display_text": "ttl" }, { "name": "serialized-value", "type": "string", "display_text": "serialized-value" }, { "name": "replace", "type": "pure-token", "display_text": "replace", "token": "REPLACE", "since": "3.0.0", "optional": true }, { "name": "absttl", "type": "pure-token", "display_text": "absttl", "token": "ABSTTL", "since": "5.0.0", "optional": true }, { "name": "seconds", "type": "integer", "display_text": "seconds", "token": "IDLETIME", "since": "5.0.0", "optional": true }, { "name": "frequency", "type": "integer", "display_text": "frequency", "token": "FREQ", "since": "5.0.0", "optional": true } ], "command_flags": [ "write", "denyoom", "asking" ], "doc_flags": [ "syscmd" ] }, "ROLE": { "summary": "Returns the replication role.", "since": "2.8.12", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@fast", "@dangerous" ], "arity": 1, "command_flags": [ "noscript", "loading", "stale", "fast" ] }, "RPOP": { "summary": "Returns and removes the last elements of a list. Deletes the list if the last element was popped.", "since": "1.0.0", "group": "list", "complexity": "O(N) where N is the number of elements returned", "history": [ [ "6.2.0", "Added the `count` argument." ] ], "acl_categories": [ "@write", "@list", "@fast" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "display_text": "count", "since": "6.2.0", "optional": true } ], "command_flags": [ "write", "fast" ] }, "RPOPLPUSH": { "summary": "Returns the last element of a list after removing and pushing it to another list. Deletes the list if the last element was popped.", "since": "1.2.0", "group": "list", "complexity": "O(1)", "deprecated_since": "6.2.0", "replaced_by": "`LMOVE` with the `RIGHT` and `LEFT` arguments", "acl_categories": [ "@write", "@list", "@slow" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "source", "type": "key", "display_text": "source", "key_spec_index": 0 }, { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 1 } ], "command_flags": [ "write", "denyoom" ], "doc_flags": [ "deprecated" ] }, "RPUSH": { "summary": "Appends one or more elements to a list. Creates the key if it doesn't exist.", "since": "1.0.0", "group": "list", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "history": [ [ "2.4.0", "Accepts multiple `element` arguments." ] ], "acl_categories": [ "@write", "@list", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "element", "type": "string", "display_text": "element", "multiple": true } ], "command_flags": [ "write", "denyoom", "fast" ] }, "RPUSHX": { "summary": "Appends an element to a list only when the list exists.", "since": "2.2.0", "group": "list", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "history": [ [ "4.0.0", "Accepts multiple `element` arguments." ] ], "acl_categories": [ "@write", "@list", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "element", "type": "string", "display_text": "element", "multiple": true } ], "command_flags": [ "write", "denyoom", "fast" ] }, "SADD": { "summary": "Adds one or more members to a set. Creates the key if it doesn't exist.", "since": "1.0.0", "group": "set", "complexity": "O(1) for each element added, so O(N) to add N elements when the command is called with multiple arguments.", "history": [ [ "2.4.0", "Accepts multiple `member` arguments." ] ], "acl_categories": [ "@write", "@set", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member", "multiple": true } ], "command_flags": [ "write", "denyoom", "fast" ] }, "SAVE": { "summary": "Synchronously saves the database(s) to disk.", "since": "1.0.0", "group": "server", "complexity": "O(N) where N is the total number of keys in all databases", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 1, "command_flags": [ "admin", "noscript", "no_async_loading", "no_multi" ] }, "SCAN": { "summary": "Iterates over the key names in the database.", "since": "2.8.0", "group": "generic", "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.", "history": [ [ "6.0.0", "Added the `TYPE` subcommand." ] ], "acl_categories": [ "@keyspace", "@read", "@slow" ], "arity": -2, "arguments": [ { "name": "cursor", "type": "integer", "display_text": "cursor" }, { "name": "pattern", "type": "pattern", "display_text": "pattern", "token": "MATCH", "optional": true }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true }, { "name": "type", "type": "string", "display_text": "type", "token": "TYPE", "since": "6.0.0", "optional": true } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output", "request_policy:special", "response_policy:special" ] }, "SCARD": { "summary": "Returns the number of members in a set.", "since": "1.0.0", "group": "set", "complexity": "O(1)", "acl_categories": [ "@read", "@set", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ] }, "SCRIPT": { "summary": "A container for Lua scripts management commands.", "since": "2.6.0", "group": "scripting", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "SCRIPT DEBUG": { "summary": "Sets the debug mode of server-side Lua scripts.", "since": "3.2.0", "group": "scripting", "complexity": "O(1)", "acl_categories": [ "@slow", "@scripting" ], "arity": 3, "arguments": [ { "name": "mode", "type": "oneof", "arguments": [ { "name": "yes", "type": "pure-token", "display_text": "yes", "token": "YES" }, { "name": "sync", "type": "pure-token", "display_text": "sync", "token": "SYNC" }, { "name": "no", "type": "pure-token", "display_text": "no", "token": "NO" } ] } ], "command_flags": [ "noscript" ] }, "SCRIPT EXISTS": { "summary": "Determines whether server-side Lua scripts exist in the script cache.", "since": "2.6.0", "group": "scripting", "complexity": "O(N) with N being the number of scripts to check (so checking a single script is an O(1) operation).", "acl_categories": [ "@slow", "@scripting" ], "arity": -3, "arguments": [ { "name": "sha1", "type": "string", "display_text": "sha1", "multiple": true } ], "command_flags": [ "noscript" ], "hints": [ "request_policy:all_shards", "response_policy:agg_logical_and" ] }, "SCRIPT FLUSH": { "summary": "Removes all server-side Lua scripts from the script cache.", "since": "2.6.0", "group": "scripting", "complexity": "O(N) with N being the number of scripts in cache", "history": [ [ "6.2.0", "Added the `ASYNC` and `SYNC` flushing mode modifiers." ] ], "acl_categories": [ "@slow", "@scripting" ], "arity": -2, "arguments": [ { "name": "flush-type", "type": "oneof", "since": "6.2.0", "optional": true, "arguments": [ { "name": "async", "type": "pure-token", "display_text": "async", "token": "ASYNC" }, { "name": "sync", "type": "pure-token", "display_text": "sync", "token": "SYNC" } ] } ], "command_flags": [ "noscript" ], "hints": [ "request_policy:all_nodes", "response_policy:all_succeeded" ] }, "SCRIPT HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "5.0.0", "group": "scripting", "complexity": "O(1)", "acl_categories": [ "@slow", "@scripting" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "SCRIPT KILL": { "summary": "Terminates a server-side Lua script during execution.", "since": "2.6.0", "group": "scripting", "complexity": "O(1)", "acl_categories": [ "@slow", "@scripting" ], "arity": 2, "command_flags": [ "noscript", "allow_busy" ], "hints": [ "request_policy:all_shards", "response_policy:one_succeeded" ] }, "SCRIPT LOAD": { "summary": "Loads a server-side Lua script to the script cache.", "since": "2.6.0", "group": "scripting", "complexity": "O(N) with N being the length in bytes of the script body.", "acl_categories": [ "@slow", "@scripting" ], "arity": 3, "arguments": [ { "name": "script", "type": "string", "display_text": "script" } ], "command_flags": [ "noscript", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:all_succeeded" ] }, "SDIFF": { "summary": "Returns the difference of multiple sets.", "since": "1.0.0", "group": "set", "complexity": "O(N) where N is the total number of elements in all given sets.", "acl_categories": [ "@read", "@set", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output_order" ] }, "SDIFFSTORE": { "summary": "Stores the difference of multiple sets in a key.", "since": "1.0.0", "group": "set", "complexity": "O(N) where N is the total number of elements in all given sets.", "acl_categories": [ "@write", "@set", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 0 }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 1, "multiple": true } ], "command_flags": [ "write", "denyoom" ] }, "SELECT": { "summary": "Changes the selected database.", "since": "1.0.0", "group": "connection", "complexity": "O(1)", "acl_categories": [ "@fast", "@connection" ], "arity": 2, "arguments": [ { "name": "index", "type": "integer", "display_text": "index" } ], "command_flags": [ "loading", "stale", "fast" ] }, "SET": { "summary": "Sets the string value of a key, ignoring its type. The key is created if it doesn't exist.", "since": "1.0.0", "group": "string", "complexity": "O(1)", "history": [ [ "2.6.12", "Added the `EX`, `PX`, `NX` and `XX` options." ], [ "6.0.0", "Added the `KEEPTTL` option." ], [ "6.2.0", "Added the `GET`, `EXAT` and `PXAT` option." ], [ "7.0.0", "Allowed the `NX` and `GET` options to be used together." ] ], "acl_categories": [ "@write", "@string", "@slow" ], "arity": -3, "key_specs": [ { "notes": "RW and ACCESS due to the optional `GET` argument", "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true, "variable_flags": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "value", "type": "string", "display_text": "value" }, { "name": "condition", "type": "oneof", "since": "2.6.12", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "display_text": "nx", "token": "NX" }, { "name": "xx", "type": "pure-token", "display_text": "xx", "token": "XX" } ] }, { "name": "get", "type": "pure-token", "display_text": "get", "token": "GET", "since": "6.2.0", "optional": true }, { "name": "expiration", "type": "oneof", "optional": true, "arguments": [ { "name": "seconds", "type": "integer", "display_text": "seconds", "token": "EX", "since": "2.6.12" }, { "name": "milliseconds", "type": "integer", "display_text": "milliseconds", "token": "PX", "since": "2.6.12" }, { "name": "unix-time-seconds", "type": "unix-time", "display_text": "unix-time-seconds", "token": "EXAT", "since": "6.2.0" }, { "name": "unix-time-milliseconds", "type": "unix-time", "display_text": "unix-time-milliseconds", "token": "PXAT", "since": "6.2.0" }, { "name": "keepttl", "type": "pure-token", "display_text": "keepttl", "token": "KEEPTTL", "since": "6.0.0" } ] } ], "command_flags": [ "write", "denyoom" ] }, "SETBIT": { "summary": "Sets or clears the bit at offset of the string value. Creates the key if it doesn't exist.", "since": "2.2.0", "group": "bitmap", "complexity": "O(1)", "acl_categories": [ "@write", "@bitmap", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "value", "type": "integer", "display_text": "value" } ], "command_flags": [ "write", "denyoom" ] }, "SETEX": { "summary": "Sets the string value and expiration time of a key. Creates the key if it doesn't exist.", "since": "2.0.0", "group": "string", "complexity": "O(1)", "deprecated_since": "2.6.12", "replaced_by": "`SET` with the `EX` argument", "acl_categories": [ "@write", "@string", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "seconds", "type": "integer", "display_text": "seconds" }, { "name": "value", "type": "string", "display_text": "value" } ], "command_flags": [ "write", "denyoom" ], "doc_flags": [ "deprecated" ] }, "SETNX": { "summary": "Set the string value of a key only when the key doesn't exist.", "since": "1.0.0", "group": "string", "complexity": "O(1)", "deprecated_since": "2.6.12", "replaced_by": "`SET` with the `NX` argument", "acl_categories": [ "@write", "@string", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "value", "type": "string", "display_text": "value" } ], "command_flags": [ "write", "denyoom", "fast" ], "doc_flags": [ "deprecated" ] }, "SETRANGE": { "summary": "Overwrites a part of a string value with another by an offset. Creates the key if it doesn't exist.", "since": "2.2.0", "group": "string", "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.", "acl_categories": [ "@write", "@string", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "value", "type": "string", "display_text": "value" } ], "command_flags": [ "write", "denyoom" ] }, "SHUTDOWN": { "summary": "Synchronously saves the database(s) to disk and shuts down the Redis server.", "since": "1.0.0", "group": "server", "complexity": "O(N) when saving, where N is the total number of keys in all databases when saving data, otherwise O(1)", "history": [ [ "7.0.0", "Added the `NOW`, `FORCE` and `ABORT` modifiers." ] ], "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -1, "arguments": [ { "name": "save-selector", "type": "oneof", "optional": true, "arguments": [ { "name": "nosave", "type": "pure-token", "display_text": "nosave", "token": "NOSAVE" }, { "name": "save", "type": "pure-token", "display_text": "save", "token": "SAVE" } ] }, { "name": "now", "type": "pure-token", "display_text": "now", "token": "NOW", "since": "7.0.0", "optional": true }, { "name": "force", "type": "pure-token", "display_text": "force", "token": "FORCE", "since": "7.0.0", "optional": true }, { "name": "abort", "type": "pure-token", "display_text": "abort", "token": "ABORT", "since": "7.0.0", "optional": true } ], "command_flags": [ "admin", "noscript", "loading", "stale", "no_multi", "allow_busy" ] }, "SINTER": { "summary": "Returns the intersect of multiple sets.", "since": "1.0.0", "group": "set", "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.", "acl_categories": [ "@read", "@set", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output_order" ] }, "SINTERCARD": { "summary": "Returns the number of members of the intersect of multiple sets.", "since": "7.0.0", "group": "set", "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.", "acl_categories": [ "@read", "@set", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RO": true, "access": true } ], "arguments": [ { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "limit", "type": "integer", "display_text": "limit", "token": "LIMIT", "optional": true } ], "command_flags": [ "readonly", "movablekeys" ] }, "SINTERSTORE": { "summary": "Stores the intersect of multiple sets in a key.", "since": "1.0.0", "group": "set", "complexity": "O(N*M) worst case where N is the cardinality of the smallest set and M is the number of sets.", "acl_categories": [ "@write", "@set", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 0 }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 1, "multiple": true } ], "command_flags": [ "write", "denyoom" ] }, "SISMEMBER": { "summary": "Determines whether a member belongs to a set.", "since": "1.0.0", "group": "set", "complexity": "O(1)", "acl_categories": [ "@read", "@set", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member" } ], "command_flags": [ "readonly", "fast" ] }, "SLAVEOF": { "summary": "Sets a Redis server as a replica of another, or promotes it to being a master.", "since": "1.0.0", "group": "server", "complexity": "O(1)", "deprecated_since": "5.0.0", "replaced_by": "`REPLICAOF`", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 3, "arguments": [ { "name": "args", "type": "oneof", "arguments": [ { "name": "host-port", "type": "block", "arguments": [ { "name": "host", "type": "string", "display_text": "host" }, { "name": "port", "type": "integer", "display_text": "port" } ] }, { "name": "no-one", "type": "block", "arguments": [ { "name": "no", "type": "pure-token", "display_text": "no", "token": "NO" }, { "name": "one", "type": "pure-token", "display_text": "one", "token": "ONE" } ] } ] } ], "command_flags": [ "admin", "noscript", "stale", "no_async_loading" ], "doc_flags": [ "deprecated" ] }, "SLOWLOG": { "summary": "A container for slow log commands.", "since": "2.2.12", "group": "server", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "SLOWLOG GET": { "summary": "Returns the slow log's entries.", "since": "2.2.12", "group": "server", "complexity": "O(N) where N is the number of entries returned", "history": [ [ "4.0.0", "Added client IP address, port and name to the reply." ] ], "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": -2, "arguments": [ { "name": "count", "type": "integer", "display_text": "count", "optional": true } ], "command_flags": [ "admin", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "nondeterministic_output" ] }, "SLOWLOG HELP": { "summary": "Show helpful text about the different subcommands", "since": "6.2.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "SLOWLOG LEN": { "summary": "Returns the number of entries in the slow log.", "since": "2.2.12", "group": "server", "complexity": "O(1)", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:agg_sum", "nondeterministic_output" ] }, "SLOWLOG RESET": { "summary": "Clears all entries from the slow log.", "since": "2.2.12", "group": "server", "complexity": "O(N) where N is the number of entries in the slowlog", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 2, "command_flags": [ "admin", "loading", "stale" ], "hints": [ "request_policy:all_nodes", "response_policy:all_succeeded" ] }, "SMEMBERS": { "summary": "Returns all members of a set.", "since": "1.0.0", "group": "set", "complexity": "O(N) where N is the set cardinality.", "acl_categories": [ "@read", "@set", "@slow" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output_order" ] }, "SMISMEMBER": { "summary": "Determines whether multiple members belong to a set.", "since": "6.2.0", "group": "set", "complexity": "O(N) where N is the number of elements being checked for membership", "acl_categories": [ "@read", "@set", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member", "multiple": true } ], "command_flags": [ "readonly", "fast" ] }, "SMOVE": { "summary": "Moves a member from one set to another.", "since": "1.0.0", "group": "set", "complexity": "O(1)", "acl_categories": [ "@write", "@set", "@fast" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "source", "type": "key", "display_text": "source", "key_spec_index": 0 }, { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 1 }, { "name": "member", "type": "string", "display_text": "member" } ], "command_flags": [ "write", "fast" ] }, "SORT": { "summary": "Sorts the elements in a list, a set, or a sorted set, optionally storing the result.", "since": "1.0.0", "group": "generic", "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 O(N).", "acl_categories": [ "@write", "@set", "@sortedset", "@list", "@slow", "@dangerous" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true }, { "notes": "For the optional BY/GET keyword. It is marked 'unknown' because the key names derive from the content of the key we sort", "begin_search": { "type": "unknown", "spec": {} }, "find_keys": { "type": "unknown", "spec": {} }, "RO": true, "access": true }, { "notes": "For the optional STORE keyword. It is marked 'unknown' because the keyword can appear anywhere in the argument array", "begin_search": { "type": "unknown", "spec": {} }, "find_keys": { "type": "unknown", "spec": {} }, "OW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "by-pattern", "type": "pattern", "display_text": "pattern", "key_spec_index": 1, "token": "BY", "optional": true }, { "name": "limit", "type": "block", "token": "LIMIT", "optional": true, "arguments": [ { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "count", "type": "integer", "display_text": "count" } ] }, { "name": "get-pattern", "type": "pattern", "display_text": "pattern", "key_spec_index": 1, "token": "GET", "optional": true, "multiple": true, "multiple_token": true }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "display_text": "asc", "token": "ASC" }, { "name": "desc", "type": "pure-token", "display_text": "desc", "token": "DESC" } ] }, { "name": "sorting", "type": "pure-token", "display_text": "sorting", "token": "ALPHA", "optional": true }, { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 2, "token": "STORE", "optional": true } ], "command_flags": [ "write", "denyoom", "movablekeys" ] }, "SORT_RO": { "summary": "Returns the sorted elements of a list, a set, or a sorted set.", "since": "7.0.0", "group": "generic", "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 O(N).", "acl_categories": [ "@read", "@set", "@sortedset", "@list", "@slow", "@dangerous" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true }, { "notes": "For the optional BY/GET keyword. It is marked 'unknown' because the key names derive from the content of the key we sort", "begin_search": { "type": "unknown", "spec": {} }, "find_keys": { "type": "unknown", "spec": {} }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "by-pattern", "type": "pattern", "display_text": "pattern", "key_spec_index": 1, "token": "BY", "optional": true }, { "name": "limit", "type": "block", "token": "LIMIT", "optional": true, "arguments": [ { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "count", "type": "integer", "display_text": "count" } ] }, { "name": "get-pattern", "type": "pattern", "display_text": "pattern", "key_spec_index": 1, "token": "GET", "optional": true, "multiple": true, "multiple_token": true }, { "name": "order", "type": "oneof", "optional": true, "arguments": [ { "name": "asc", "type": "pure-token", "display_text": "asc", "token": "ASC" }, { "name": "desc", "type": "pure-token", "display_text": "desc", "token": "DESC" } ] }, { "name": "sorting", "type": "pure-token", "display_text": "sorting", "token": "ALPHA", "optional": true } ], "command_flags": [ "readonly", "movablekeys" ] }, "SPOP": { "summary": "Returns one or more random members from a set after removing them. Deletes the set if the last member was popped.", "since": "1.0.0", "group": "set", "complexity": "Without the count argument O(1), otherwise O(N) where N is the value of the passed count.", "history": [ [ "3.2.0", "Added the `count` argument." ] ], "acl_categories": [ "@write", "@set", "@fast" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "display_text": "count", "since": "3.2.0", "optional": true } ], "command_flags": [ "write", "fast" ], "hints": [ "nondeterministic_output" ] }, "SPUBLISH": { "summary": "Post a message to a shard channel", "since": "7.0.0", "group": "pubsub", "complexity": "O(N) where N is the number of clients subscribed to the receiving shard channel.", "acl_categories": [ "@pubsub", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "not_key": true } ], "arguments": [ { "name": "shardchannel", "type": "string", "display_text": "shardchannel" }, { "name": "message", "type": "string", "display_text": "message" } ], "command_flags": [ "pubsub", "loading", "stale", "fast" ] }, "SRANDMEMBER": { "summary": "Get one or multiple random members from a set", "since": "1.0.0", "group": "set", "complexity": "Without the count argument O(1), otherwise O(N) where N is the absolute value of the passed count.", "history": [ [ "2.6.0", "Added the optional `count` argument." ] ], "acl_categories": [ "@read", "@set", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "display_text": "count", "since": "2.6.0", "optional": true } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "SREM": { "summary": "Removes one or more members from a set. Deletes the set if the last member was removed.", "since": "1.0.0", "group": "set", "complexity": "O(N) where N is the number of members to be removed.", "history": [ [ "2.4.0", "Accepts multiple `member` arguments." ] ], "acl_categories": [ "@write", "@set", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member", "multiple": true } ], "command_flags": [ "write", "fast" ] }, "SSCAN": { "summary": "Iterates over members of a set.", "since": "2.8.0", "group": "set", "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.", "acl_categories": [ "@read", "@set", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "cursor", "type": "integer", "display_text": "cursor" }, { "name": "pattern", "type": "pattern", "display_text": "pattern", "token": "MATCH", "optional": true }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "SSUBSCRIBE": { "summary": "Listens for messages published to shard channels.", "since": "7.0.0", "group": "pubsub", "complexity": "O(N) where N is the number of shard channels to subscribe to.", "acl_categories": [ "@pubsub", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "not_key": true } ], "arguments": [ { "name": "shardchannel", "type": "string", "display_text": "shardchannel", "multiple": true } ], "command_flags": [ "pubsub", "noscript", "loading", "stale" ] }, "STRLEN": { "summary": "Returns the length of a string value.", "since": "2.2.0", "group": "string", "complexity": "O(1)", "acl_categories": [ "@read", "@string", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ] }, "SUBSCRIBE": { "summary": "Listens for messages published to channels.", "since": "2.0.0", "group": "pubsub", "complexity": "O(N) where N is the number of channels to subscribe to.", "acl_categories": [ "@pubsub", "@slow" ], "arity": -2, "arguments": [ { "name": "channel", "type": "string", "display_text": "channel", "multiple": true } ], "command_flags": [ "pubsub", "noscript", "loading", "stale" ] }, "SUBSTR": { "summary": "Returns a substring from a string value.", "since": "1.0.0", "group": "string", "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.", "deprecated_since": "2.0.0", "replaced_by": "`GETRANGE`", "acl_categories": [ "@read", "@string", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer", "display_text": "start" }, { "name": "end", "type": "integer", "display_text": "end" } ], "command_flags": [ "readonly" ], "doc_flags": [ "deprecated" ] }, "SUNION": { "summary": "Returns the union of multiple sets.", "since": "1.0.0", "group": "set", "complexity": "O(N) where N is the total number of elements in all given sets.", "acl_categories": [ "@read", "@set", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output_order" ] }, "SUNIONSTORE": { "summary": "Stores the union of multiple sets in a key.", "since": "1.0.0", "group": "set", "complexity": "O(N) where N is the total number of elements in all given sets.", "acl_categories": [ "@write", "@set", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 0 }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 1, "multiple": true } ], "command_flags": [ "write", "denyoom" ] }, "SUNSUBSCRIBE": { "summary": "Stops listening to messages posted to shard channels.", "since": "7.0.0", "group": "pubsub", "complexity": "O(N) where N is the number of shard channels to unsubscribe.", "acl_categories": [ "@pubsub", "@slow" ], "arity": -1, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "not_key": true } ], "arguments": [ { "name": "shardchannel", "type": "string", "display_text": "shardchannel", "optional": true, "multiple": true } ], "command_flags": [ "pubsub", "noscript", "loading", "stale" ] }, "SWAPDB": { "summary": "Swaps two Redis databases.", "since": "4.0.0", "group": "server", "complexity": "O(N) where N is the count of clients watching or blocking on keys from both databases.", "acl_categories": [ "@keyspace", "@write", "@fast", "@dangerous" ], "arity": 3, "arguments": [ { "name": "index1", "type": "integer", "display_text": "index1" }, { "name": "index2", "type": "integer", "display_text": "index2" } ], "command_flags": [ "write", "fast" ] }, "SYNC": { "summary": "An internal command used in replication.", "since": "1.0.0", "group": "server", "acl_categories": [ "@admin", "@slow", "@dangerous" ], "arity": 1, "command_flags": [ "admin", "noscript", "no_async_loading", "no_multi" ] }, "TIME": { "summary": "Returns the server time.", "since": "2.6.0", "group": "server", "complexity": "O(1)", "acl_categories": [ "@fast" ], "arity": 1, "command_flags": [ "loading", "stale", "fast" ], "hints": [ "nondeterministic_output" ] }, "TOUCH": { "summary": "Returns the number of existing keys out of those specified after updating the time they were last accessed.", "since": "3.2.1", "group": "generic", "complexity": "O(N) where N is the number of keys that will be touched.", "acl_categories": [ "@keyspace", "@read", "@fast" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true } ], "command_flags": [ "readonly", "fast" ], "hints": [ "request_policy:multi_shard", "response_policy:agg_sum" ] }, "TTL": { "summary": "Returns the expiration time in seconds of a key.", "since": "1.0.0", "group": "generic", "complexity": "O(1)", "history": [ [ "2.8.0", "Added the -2 reply." ] ], "acl_categories": [ "@keyspace", "@read", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ], "hints": [ "nondeterministic_output" ] }, "TYPE": { "summary": "Determines the type of value stored at a key.", "since": "1.0.0", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@keyspace", "@read", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ] }, "UNLINK": { "summary": "Asynchronously deletes one or more keys.", "since": "4.0.0", "group": "generic", "complexity": "O(1) for each key removed regardless of its size. Then the command does O(N) work in a different thread in order to reclaim memory, where N is the number of allocations the deleted objects where composed of.", "acl_categories": [ "@keyspace", "@write", "@fast" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RM": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true } ], "command_flags": [ "write", "fast" ], "hints": [ "request_policy:multi_shard", "response_policy:agg_sum" ] }, "UNSUBSCRIBE": { "summary": "Stops listening to messages posted to channels.", "since": "2.0.0", "group": "pubsub", "complexity": "O(N) where N is the number of channels to unsubscribe.", "acl_categories": [ "@pubsub", "@slow" ], "arity": -1, "arguments": [ { "name": "channel", "type": "string", "display_text": "channel", "optional": true, "multiple": true } ], "command_flags": [ "pubsub", "noscript", "loading", "stale" ] }, "UNWATCH": { "summary": "Forgets about watched keys of a transaction.", "since": "2.2.0", "group": "transactions", "complexity": "O(1)", "acl_categories": [ "@fast", "@transaction" ], "arity": 1, "command_flags": [ "noscript", "loading", "stale", "fast", "allow_busy" ] }, "WAIT": { "summary": "Blocks until the asynchronous replication of all preceding write commands sent by the connection is completed.", "since": "3.0.0", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 3, "arguments": [ { "name": "numreplicas", "type": "integer", "display_text": "numreplicas" }, { "name": "timeout", "type": "integer", "display_text": "timeout" } ], "hints": [ "request_policy:all_shards", "response_policy:agg_min" ] }, "WAITAOF": { "summary": "Blocks until all of the preceding write commands sent by the connection are written to the append-only file of the master and/or replicas.", "since": "7.2.0", "group": "generic", "complexity": "O(1)", "acl_categories": [ "@slow", "@connection" ], "arity": 4, "arguments": [ { "name": "numlocal", "type": "integer", "display_text": "numlocal" }, { "name": "numreplicas", "type": "integer", "display_text": "numreplicas" }, { "name": "timeout", "type": "integer", "display_text": "timeout" } ], "command_flags": [ "noscript" ], "hints": [ "request_policy:all_shards", "response_policy:agg_min" ] }, "WATCH": { "summary": "Monitors changes to keys to determine the execution of a transaction.", "since": "2.2.0", "group": "transactions", "complexity": "O(1) for every key.", "acl_categories": [ "@fast", "@transaction" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true } ], "command_flags": [ "noscript", "loading", "stale", "fast", "allow_busy" ] }, "XACK": { "summary": "Returns the number of messages that were successfully acknowledged by the consumer group member of a stream.", "since": "5.0.0", "group": "stream", "complexity": "O(1) for each message ID processed.", "acl_categories": [ "@write", "@stream", "@fast" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "group", "type": "string", "display_text": "group" }, { "name": "id", "type": "string", "display_text": "id", "multiple": true } ], "command_flags": [ "write", "fast" ] }, "XADD": { "summary": "Appends a new message to a stream. Creates the key if it doesn't exist.", "since": "5.0.0", "group": "stream", "complexity": "O(1) when adding a new entry, O(N) when trimming where N being the number of entries evicted.", "history": [ [ "6.2.0", "Added the `NOMKSTREAM` option, `MINID` trimming strategy and the `LIMIT` option." ], [ "7.0.0", "Added support for the `-*` explicit ID form." ] ], "acl_categories": [ "@write", "@stream", "@fast" ], "arity": -5, "key_specs": [ { "notes": "UPDATE instead of INSERT because of the optional trimming feature", "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "nomkstream", "type": "pure-token", "display_text": "nomkstream", "token": "NOMKSTREAM", "since": "6.2.0", "optional": true }, { "name": "trim", "type": "block", "optional": true, "arguments": [ { "name": "strategy", "type": "oneof", "arguments": [ { "name": "maxlen", "type": "pure-token", "display_text": "maxlen", "token": "MAXLEN" }, { "name": "minid", "type": "pure-token", "display_text": "minid", "token": "MINID", "since": "6.2.0" } ] }, { "name": "operator", "type": "oneof", "optional": true, "arguments": [ { "name": "equal", "type": "pure-token", "display_text": "equal", "token": "=" }, { "name": "approximately", "type": "pure-token", "display_text": "approximately", "token": "~" } ] }, { "name": "threshold", "type": "string", "display_text": "threshold" }, { "name": "count", "type": "integer", "display_text": "count", "token": "LIMIT", "since": "6.2.0", "optional": true } ] }, { "name": "id-selector", "type": "oneof", "arguments": [ { "name": "auto-id", "type": "pure-token", "display_text": "auto-id", "token": "*" }, { "name": "id", "type": "string", "display_text": "id" } ] }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "field", "type": "string", "display_text": "field" }, { "name": "value", "type": "string", "display_text": "value" } ] } ], "command_flags": [ "write", "denyoom", "fast" ], "hints": [ "nondeterministic_output" ] }, "XAUTOCLAIM": { "summary": "Changes, or acquires, ownership of messages in a consumer group, as if the messages were delivered to as consumer group member.", "since": "6.2.0", "group": "stream", "complexity": "O(1) if COUNT is small.", "history": [ [ "7.0.0", "Added an element to the reply array, containing deleted entries the command cleared from the PEL" ] ], "acl_categories": [ "@write", "@stream", "@fast" ], "arity": -6, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "group", "type": "string", "display_text": "group" }, { "name": "consumer", "type": "string", "display_text": "consumer" }, { "name": "min-idle-time", "type": "string", "display_text": "min-idle-time" }, { "name": "start", "type": "string", "display_text": "start" }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true }, { "name": "justid", "type": "pure-token", "display_text": "justid", "token": "JUSTID", "optional": true } ], "command_flags": [ "write", "fast" ], "hints": [ "nondeterministic_output" ] }, "XCLAIM": { "summary": "Changes, or acquires, ownership of a message in a consumer group, as if the message was delivered a consumer group member.", "since": "5.0.0", "group": "stream", "complexity": "O(log N) with N being the number of messages in the PEL of the consumer group.", "acl_categories": [ "@write", "@stream", "@fast" ], "arity": -6, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "group", "type": "string", "display_text": "group" }, { "name": "consumer", "type": "string", "display_text": "consumer" }, { "name": "min-idle-time", "type": "string", "display_text": "min-idle-time" }, { "name": "id", "type": "string", "display_text": "id", "multiple": true }, { "name": "ms", "type": "integer", "display_text": "ms", "token": "IDLE", "optional": true }, { "name": "unix-time-milliseconds", "type": "unix-time", "display_text": "unix-time-milliseconds", "token": "TIME", "optional": true }, { "name": "count", "type": "integer", "display_text": "count", "token": "RETRYCOUNT", "optional": true }, { "name": "force", "type": "pure-token", "display_text": "force", "token": "FORCE", "optional": true }, { "name": "justid", "type": "pure-token", "display_text": "justid", "token": "JUSTID", "optional": true }, { "name": "lastid", "type": "string", "display_text": "lastid", "token": "LASTID", "optional": true } ], "command_flags": [ "write", "fast" ], "hints": [ "nondeterministic_output" ] }, "XDEL": { "summary": "Returns the number of messages after removing them from a stream.", "since": "5.0.0", "group": "stream", "complexity": "O(1) for each single item to delete in the stream, regardless of the stream size.", "acl_categories": [ "@write", "@stream", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "id", "type": "string", "display_text": "id", "multiple": true } ], "command_flags": [ "write", "fast" ] }, "XGROUP": { "summary": "A container for consumer groups commands.", "since": "5.0.0", "group": "stream", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "XGROUP CREATE": { "summary": "Creates a consumer group.", "since": "5.0.0", "group": "stream", "complexity": "O(1)", "history": [ [ "7.0.0", "Added the `entries_read` named argument." ] ], "acl_categories": [ "@write", "@stream", "@slow" ], "arity": -5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "group", "type": "string", "display_text": "group" }, { "name": "id-selector", "type": "oneof", "arguments": [ { "name": "id", "type": "string", "display_text": "id" }, { "name": "new-id", "type": "pure-token", "display_text": "new-id", "token": "$" } ] }, { "name": "mkstream", "type": "pure-token", "display_text": "mkstream", "token": "MKSTREAM", "optional": true }, { "name": "entries-read", "type": "integer", "display_text": "entries-read", "token": "ENTRIESREAD", "optional": true } ], "command_flags": [ "write", "denyoom" ] }, "XGROUP CREATECONSUMER": { "summary": "Creates a consumer in a consumer group.", "since": "6.2.0", "group": "stream", "complexity": "O(1)", "acl_categories": [ "@write", "@stream", "@slow" ], "arity": 5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "insert": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "group", "type": "string", "display_text": "group" }, { "name": "consumer", "type": "string", "display_text": "consumer" } ], "command_flags": [ "write", "denyoom" ] }, "XGROUP DELCONSUMER": { "summary": "Deletes a consumer from a consumer group.", "since": "5.0.0", "group": "stream", "complexity": "O(1)", "acl_categories": [ "@write", "@stream", "@slow" ], "arity": 5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "group", "type": "string", "display_text": "group" }, { "name": "consumer", "type": "string", "display_text": "consumer" } ], "command_flags": [ "write" ] }, "XGROUP DESTROY": { "summary": "Destroys a consumer group.", "since": "5.0.0", "group": "stream", "complexity": "O(N) where N is the number of entries in the group's pending entries list (PEL).", "acl_categories": [ "@write", "@stream", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "group", "type": "string", "display_text": "group" } ], "command_flags": [ "write" ] }, "XGROUP HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "5.0.0", "group": "stream", "complexity": "O(1)", "acl_categories": [ "@stream", "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "XGROUP SETID": { "summary": "Sets the last-delivered ID of a consumer group.", "since": "5.0.0", "group": "stream", "complexity": "O(1)", "history": [ [ "7.0.0", "Added the optional `entries_read` argument." ] ], "acl_categories": [ "@write", "@stream", "@slow" ], "arity": -5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "group", "type": "string", "display_text": "group" }, { "name": "id-selector", "type": "oneof", "arguments": [ { "name": "id", "type": "string", "display_text": "id" }, { "name": "new-id", "type": "pure-token", "display_text": "new-id", "token": "$" } ] }, { "name": "entriesread", "type": "integer", "display_text": "entries-read", "token": "ENTRIESREAD", "optional": true } ], "command_flags": [ "write" ] }, "XINFO": { "summary": "A container for stream introspection commands.", "since": "5.0.0", "group": "stream", "complexity": "Depends on subcommand.", "acl_categories": [ "@slow" ], "arity": -2 }, "XINFO CONSUMERS": { "summary": "Returns a list of the consumers in a consumer group.", "since": "5.0.0", "group": "stream", "complexity": "O(1)", "history": [ [ "7.2.0", "Added the `inactive` field." ] ], "acl_categories": [ "@read", "@stream", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "group", "type": "string", "display_text": "group" } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "XINFO GROUPS": { "summary": "Returns a list of the consumer groups of a stream.", "since": "5.0.0", "group": "stream", "complexity": "O(1)", "history": [ [ "7.0.0", "Added the `entries-read` and `lag` fields" ] ], "acl_categories": [ "@read", "@stream", "@slow" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly" ] }, "XINFO HELP": { "summary": "Returns helpful text about the different subcommands.", "since": "5.0.0", "group": "stream", "complexity": "O(1)", "acl_categories": [ "@stream", "@slow" ], "arity": 2, "command_flags": [ "loading", "stale" ] }, "XINFO STREAM": { "summary": "Returns information about a stream.", "since": "5.0.0", "group": "stream", "complexity": "O(1)", "history": [ [ "6.0.0", "Added the `FULL` modifier." ], [ "7.0.0", "Added the `max-deleted-entry-id`, `entries-added`, `recorded-first-entry-id`, `entries-read` and `lag` fields" ], [ "7.2.0", "Added the `active-time` field, and changed the meaning of `seen-time`." ] ], "acl_categories": [ "@read", "@stream", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "full-block", "type": "block", "optional": true, "arguments": [ { "name": "full", "type": "pure-token", "display_text": "full", "token": "FULL" }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true } ] } ], "command_flags": [ "readonly" ] }, "XLEN": { "summary": "Return the number of messages in a stream.", "since": "5.0.0", "group": "stream", "complexity": "O(1)", "acl_categories": [ "@read", "@stream", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ] }, "XPENDING": { "summary": "Returns the information and entries from a stream consumer group's pending entries list.", "since": "5.0.0", "group": "stream", "complexity": "O(N) with N being the number of elements returned, so asking for a small fixed number of entries per call is O(1). O(M), where M is the total number of entries scanned when used with the IDLE filter. When the command returns just the summary and the list of consumers is small, it runs in O(1) time; otherwise, an additional O(N) time for iterating every consumer.", "history": [ [ "6.2.0", "Added the `IDLE` option and exclusive range intervals." ] ], "acl_categories": [ "@read", "@stream", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "group", "type": "string", "display_text": "group" }, { "name": "filters", "type": "block", "optional": true, "arguments": [ { "name": "min-idle-time", "type": "integer", "display_text": "min-idle-time", "token": "IDLE", "since": "6.2.0", "optional": true }, { "name": "start", "type": "string", "display_text": "start" }, { "name": "end", "type": "string", "display_text": "end" }, { "name": "count", "type": "integer", "display_text": "count" }, { "name": "consumer", "type": "string", "display_text": "consumer", "optional": true } ] } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "XRANGE": { "summary": "Returns the messages from a stream within a range of IDs.", "since": "5.0.0", "group": "stream", "complexity": "O(N) with N being the number of elements being returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).", "history": [ [ "6.2.0", "Added exclusive ranges." ] ], "acl_categories": [ "@read", "@stream", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "start", "type": "string", "display_text": "start" }, { "name": "end", "type": "string", "display_text": "end" }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true } ], "command_flags": [ "readonly" ] }, "XREAD": { "summary": "Returns messages from multiple streams with IDs greater than the ones requested. Blocks until a message is available otherwise.", "since": "5.0.0", "group": "stream", "acl_categories": [ "@read", "@stream", "@slow", "@blocking" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "keyword", "spec": { "keyword": "STREAMS", "startfrom": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 2 } }, "RO": true, "access": true } ], "arguments": [ { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true }, { "name": "milliseconds", "type": "integer", "display_text": "milliseconds", "token": "BLOCK", "optional": true }, { "name": "streams", "type": "block", "token": "STREAMS", "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "id", "type": "string", "display_text": "id", "multiple": true } ] } ], "command_flags": [ "readonly", "blocking", "movablekeys" ] }, "XREADGROUP": { "summary": "Returns new or historical messages from a stream for a consumer in a group. Blocks until a message is available otherwise.", "since": "5.0.0", "group": "stream", "complexity": "For each stream mentioned: O(M) with M being the number of elements returned. If M is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1). On the other side when XREADGROUP blocks, XADD will pay the O(N) time in order to serve the N clients blocked on the stream getting new data.", "acl_categories": [ "@write", "@stream", "@slow", "@blocking" ], "arity": -7, "key_specs": [ { "begin_search": { "type": "keyword", "spec": { "keyword": "STREAMS", "startfrom": 4 } }, "find_keys": { "type": "range", "spec": { "lastkey": -1, "keystep": 1, "limit": 2 } }, "RO": true, "access": true } ], "arguments": [ { "name": "group-block", "type": "block", "token": "GROUP", "arguments": [ { "name": "group", "type": "string", "display_text": "group" }, { "name": "consumer", "type": "string", "display_text": "consumer" } ] }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true }, { "name": "milliseconds", "type": "integer", "display_text": "milliseconds", "token": "BLOCK", "optional": true }, { "name": "noack", "type": "pure-token", "display_text": "noack", "token": "NOACK", "optional": true }, { "name": "streams", "type": "block", "token": "STREAMS", "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "id", "type": "string", "display_text": "id", "multiple": true } ] } ], "command_flags": [ "write", "blocking", "movablekeys" ] }, "XREVRANGE": { "summary": "Returns the messages from a stream within a range of IDs in reverse order.", "since": "5.0.0", "group": "stream", "complexity": "O(N) with N being the number of elements returned. If N is constant (e.g. always asking for the first 10 elements with COUNT), you can consider it O(1).", "history": [ [ "6.2.0", "Added exclusive ranges." ] ], "acl_categories": [ "@read", "@stream", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "end", "type": "string", "display_text": "end" }, { "name": "start", "type": "string", "display_text": "start" }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true } ], "command_flags": [ "readonly" ] }, "XSETID": { "summary": "An internal command for replicating stream values.", "since": "5.0.0", "group": "stream", "complexity": "O(1)", "history": [ [ "7.0.0", "Added the `entries_added` and `max_deleted_entry_id` arguments." ] ], "acl_categories": [ "@write", "@stream", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "last-id", "type": "string", "display_text": "last-id" }, { "name": "entries-added", "type": "integer", "display_text": "entries-added", "token": "ENTRIESADDED", "since": "7.0.0", "optional": true }, { "name": "max-deleted-id", "type": "string", "display_text": "max-deleted-id", "token": "MAXDELETEDID", "since": "7.0.0", "optional": true } ], "command_flags": [ "write", "denyoom", "fast" ] }, "XTRIM": { "summary": "Deletes messages from the beginning of a stream.", "since": "5.0.0", "group": "stream", "complexity": "O(N), with N being the number of evicted entries. Constant times are very small however, since entries are organized in macro nodes containing multiple entries that can be released with a single deallocation.", "history": [ [ "6.2.0", "Added the `MINID` trimming strategy and the `LIMIT` option." ] ], "acl_categories": [ "@write", "@stream", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "trim", "type": "block", "arguments": [ { "name": "strategy", "type": "oneof", "arguments": [ { "name": "maxlen", "type": "pure-token", "display_text": "maxlen", "token": "MAXLEN" }, { "name": "minid", "type": "pure-token", "display_text": "minid", "token": "MINID", "since": "6.2.0" } ] }, { "name": "operator", "type": "oneof", "optional": true, "arguments": [ { "name": "equal", "type": "pure-token", "display_text": "equal", "token": "=" }, { "name": "approximately", "type": "pure-token", "display_text": "approximately", "token": "~" } ] }, { "name": "threshold", "type": "string", "display_text": "threshold" }, { "name": "count", "type": "integer", "display_text": "count", "token": "LIMIT", "since": "6.2.0", "optional": true } ] } ], "command_flags": [ "write" ], "hints": [ "nondeterministic_output" ] }, "ZADD": { "summary": "Adds one or more members to a sorted set, or updates their scores. Creates the key if it doesn't exist.", "since": "1.2.0", "group": "sorted-set", "complexity": "O(log(N)) for each item added, where N is the number of elements in the sorted set.", "history": [ [ "2.4.0", "Accepts multiple elements." ], [ "3.0.2", "Added the `XX`, `NX`, `CH` and `INCR` options." ], [ "6.2.0", "Added the `GT` and `LT` options." ] ], "acl_categories": [ "@write", "@sortedset", "@fast" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "condition", "type": "oneof", "since": "3.0.2", "optional": true, "arguments": [ { "name": "nx", "type": "pure-token", "display_text": "nx", "token": "NX" }, { "name": "xx", "type": "pure-token", "display_text": "xx", "token": "XX" } ] }, { "name": "comparison", "type": "oneof", "since": "6.2.0", "optional": true, "arguments": [ { "name": "gt", "type": "pure-token", "display_text": "gt", "token": "GT" }, { "name": "lt", "type": "pure-token", "display_text": "lt", "token": "LT" } ] }, { "name": "change", "type": "pure-token", "display_text": "change", "token": "CH", "since": "3.0.2", "optional": true }, { "name": "increment", "type": "pure-token", "display_text": "increment", "token": "INCR", "since": "3.0.2", "optional": true }, { "name": "data", "type": "block", "multiple": true, "arguments": [ { "name": "score", "type": "double", "display_text": "score" }, { "name": "member", "type": "string", "display_text": "member" } ] } ], "command_flags": [ "write", "denyoom", "fast" ] }, "ZCARD": { "summary": "Returns the number of members in a sorted set.", "since": "1.2.0", "group": "sorted-set", "complexity": "O(1)", "acl_categories": [ "@read", "@sortedset", "@fast" ], "arity": 2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 } ], "command_flags": [ "readonly", "fast" ] }, "ZCOUNT": { "summary": "Returns the count of members in a sorted set that have scores within a range.", "since": "2.0.0", "group": "sorted-set", "complexity": "O(log(N)) with N being the number of elements in the sorted set.", "acl_categories": [ "@read", "@sortedset", "@fast" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "min", "type": "double", "display_text": "min" }, { "name": "max", "type": "double", "display_text": "max" } ], "command_flags": [ "readonly", "fast" ] }, "ZDIFF": { "summary": "Returns the difference between multiple sorted sets.", "since": "6.2.0", "group": "sorted-set", "complexity": "O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.", "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RO": true, "access": true } ], "arguments": [ { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "withscores", "type": "pure-token", "display_text": "withscores", "token": "WITHSCORES", "optional": true } ], "command_flags": [ "readonly", "movablekeys" ] }, "ZDIFFSTORE": { "summary": "Stores the difference of multiple sorted sets in a key.", "since": "6.2.0", "group": "sorted-set", "complexity": "O(L + (N-K)log(N)) worst case where L is the total number of elements in all the sets, N is the size of the first set, and K is the size of the result set.", "acl_categories": [ "@write", "@sortedset", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RO": true, "access": true } ], "arguments": [ { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 0 }, { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 1, "multiple": true } ], "command_flags": [ "write", "denyoom", "movablekeys" ] }, "ZINCRBY": { "summary": "Increments the score of a member in a sorted set.", "since": "1.2.0", "group": "sorted-set", "complexity": "O(log(N)) where N is the number of elements in the sorted set.", "acl_categories": [ "@write", "@sortedset", "@fast" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "update": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "increment", "type": "integer", "display_text": "increment" }, { "name": "member", "type": "string", "display_text": "member" } ], "command_flags": [ "write", "denyoom", "fast" ] }, "ZINTER": { "summary": "Returns the intersect of multiple sorted sets.", "since": "6.2.0", "group": "sorted-set", "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.", "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RO": true, "access": true } ], "arguments": [ { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "weight", "type": "integer", "display_text": "weight", "token": "WEIGHTS", "optional": true, "multiple": true }, { "name": "aggregate", "type": "oneof", "token": "AGGREGATE", "optional": true, "arguments": [ { "name": "sum", "type": "pure-token", "display_text": "sum", "token": "SUM" }, { "name": "min", "type": "pure-token", "display_text": "min", "token": "MIN" }, { "name": "max", "type": "pure-token", "display_text": "max", "token": "MAX" } ] }, { "name": "withscores", "type": "pure-token", "display_text": "withscores", "token": "WITHSCORES", "optional": true } ], "command_flags": [ "readonly", "movablekeys" ] }, "ZINTERCARD": { "summary": "Returns the number of members of the intersect of multiple sorted sets.", "since": "7.0.0", "group": "sorted-set", "complexity": "O(N*K) worst case with N being the smallest input sorted set, K being the number of input sorted sets.", "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RO": true, "access": true } ], "arguments": [ { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "limit", "type": "integer", "display_text": "limit", "token": "LIMIT", "optional": true } ], "command_flags": [ "readonly", "movablekeys" ] }, "ZINTERSTORE": { "summary": "Stores the intersect of multiple sorted sets in a key.", "since": "2.0.0", "group": "sorted-set", "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.", "acl_categories": [ "@write", "@sortedset", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RO": true, "access": true } ], "arguments": [ { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 0 }, { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 1, "multiple": true }, { "name": "weight", "type": "integer", "display_text": "weight", "token": "WEIGHTS", "optional": true, "multiple": true }, { "name": "aggregate", "type": "oneof", "token": "AGGREGATE", "optional": true, "arguments": [ { "name": "sum", "type": "pure-token", "display_text": "sum", "token": "SUM" }, { "name": "min", "type": "pure-token", "display_text": "min", "token": "MIN" }, { "name": "max", "type": "pure-token", "display_text": "max", "token": "MAX" } ] } ], "command_flags": [ "write", "denyoom", "movablekeys" ] }, "ZLEXCOUNT": { "summary": "Returns the number of members in a sorted set within a lexicographical range.", "since": "2.8.9", "group": "sorted-set", "complexity": "O(log(N)) with N being the number of elements in the sorted set.", "acl_categories": [ "@read", "@sortedset", "@fast" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "min", "type": "string", "display_text": "min" }, { "name": "max", "type": "string", "display_text": "max" } ], "command_flags": [ "readonly", "fast" ] }, "ZMPOP": { "summary": "Returns the highest- or lowest-scoring members from one or more sorted sets after removing them. Deletes the sorted set if the last member was popped.", "since": "7.0.0", "group": "sorted-set", "complexity": "O(K) + O(M*log(N)) where K is the number of provided keys, N being the number of elements in the sorted set, and M being the number of elements popped.", "acl_categories": [ "@write", "@sortedset", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "where", "type": "oneof", "arguments": [ { "name": "min", "type": "pure-token", "display_text": "min", "token": "MIN" }, { "name": "max", "type": "pure-token", "display_text": "max", "token": "MAX" } ] }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true } ], "command_flags": [ "write", "movablekeys" ] }, "ZMSCORE": { "summary": "Returns the score of one or more members in a sorted set.", "since": "6.2.0", "group": "sorted-set", "complexity": "O(N) where N is the number of members being requested.", "acl_categories": [ "@read", "@sortedset", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member", "multiple": true } ], "command_flags": [ "readonly", "fast" ] }, "ZPOPMAX": { "summary": "Returns the highest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.", "since": "5.0.0", "group": "sorted-set", "complexity": "O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.", "acl_categories": [ "@write", "@sortedset", "@fast" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "display_text": "count", "optional": true } ], "command_flags": [ "write", "fast" ] }, "ZPOPMIN": { "summary": "Returns the lowest-scoring members from a sorted set after removing them. Deletes the sorted set if the last member was popped.", "since": "5.0.0", "group": "sorted-set", "complexity": "O(log(N)*M) with N being the number of elements in the sorted set, and M being the number of elements popped.", "acl_categories": [ "@write", "@sortedset", "@fast" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "access": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "count", "type": "integer", "display_text": "count", "optional": true } ], "command_flags": [ "write", "fast" ] }, "ZRANDMEMBER": { "summary": "Returns one or more random members from a sorted set.", "since": "6.2.0", "group": "sorted-set", "complexity": "O(N) where N is the number of members returned", "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -2, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "options", "type": "block", "optional": true, "arguments": [ { "name": "count", "type": "integer", "display_text": "count" }, { "name": "withscores", "type": "pure-token", "display_text": "withscores", "token": "WITHSCORES", "optional": true } ] } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "ZRANGE": { "summary": "Returns members in a sorted set within a range of indexes.", "since": "1.2.0", "group": "sorted-set", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.", "history": [ [ "6.2.0", "Added the `REV`, `BYSCORE`, `BYLEX` and `LIMIT` options." ] ], "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "start", "type": "string", "display_text": "start" }, { "name": "stop", "type": "string", "display_text": "stop" }, { "name": "sortby", "type": "oneof", "since": "6.2.0", "optional": true, "arguments": [ { "name": "byscore", "type": "pure-token", "display_text": "byscore", "token": "BYSCORE" }, { "name": "bylex", "type": "pure-token", "display_text": "bylex", "token": "BYLEX" } ] }, { "name": "rev", "type": "pure-token", "display_text": "rev", "token": "REV", "since": "6.2.0", "optional": true }, { "name": "limit", "type": "block", "token": "LIMIT", "since": "6.2.0", "optional": true, "arguments": [ { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "count", "type": "integer", "display_text": "count" } ] }, { "name": "withscores", "type": "pure-token", "display_text": "withscores", "token": "WITHSCORES", "optional": true } ], "command_flags": [ "readonly" ] }, "ZRANGEBYLEX": { "summary": "Returns members in a sorted set within a lexicographical range.", "since": "2.8.9", "group": "sorted-set", "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)).", "deprecated_since": "6.2.0", "replaced_by": "`ZRANGE` with the `BYLEX` argument", "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "min", "type": "string", "display_text": "min" }, { "name": "max", "type": "string", "display_text": "max" }, { "name": "limit", "type": "block", "token": "LIMIT", "optional": true, "arguments": [ { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "count", "type": "integer", "display_text": "count" } ] } ], "command_flags": [ "readonly" ], "doc_flags": [ "deprecated" ] }, "ZRANGEBYSCORE": { "summary": "Returns members in a sorted set within a range of scores.", "since": "1.0.5", "group": "sorted-set", "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)).", "deprecated_since": "6.2.0", "replaced_by": "`ZRANGE` with the `BYSCORE` argument", "history": [ [ "2.0.0", "Added the `WITHSCORES` modifier." ] ], "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "min", "type": "double", "display_text": "min" }, { "name": "max", "type": "double", "display_text": "max" }, { "name": "withscores", "type": "pure-token", "display_text": "withscores", "token": "WITHSCORES", "since": "2.0.0", "optional": true }, { "name": "limit", "type": "block", "token": "LIMIT", "optional": true, "arguments": [ { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "count", "type": "integer", "display_text": "count" } ] } ], "command_flags": [ "readonly" ], "doc_flags": [ "deprecated" ] }, "ZRANGESTORE": { "summary": "Stores a range of members from sorted set in a key.", "since": "6.2.0", "group": "sorted-set", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements stored into the destination key.", "acl_categories": [ "@write", "@sortedset", "@slow" ], "arity": -5, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "dst", "type": "key", "display_text": "dst", "key_spec_index": 0 }, { "name": "src", "type": "key", "display_text": "src", "key_spec_index": 1 }, { "name": "min", "type": "string", "display_text": "min" }, { "name": "max", "type": "string", "display_text": "max" }, { "name": "sortby", "type": "oneof", "optional": true, "arguments": [ { "name": "byscore", "type": "pure-token", "display_text": "byscore", "token": "BYSCORE" }, { "name": "bylex", "type": "pure-token", "display_text": "bylex", "token": "BYLEX" } ] }, { "name": "rev", "type": "pure-token", "display_text": "rev", "token": "REV", "optional": true }, { "name": "limit", "type": "block", "token": "LIMIT", "optional": true, "arguments": [ { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "count", "type": "integer", "display_text": "count" } ] } ], "command_flags": [ "write", "denyoom" ] }, "ZRANK": { "summary": "Returns the index of a member in a sorted set ordered by ascending scores.", "since": "2.0.0", "group": "sorted-set", "complexity": "O(log(N))", "history": [ [ "7.2.0", "Added the optional `WITHSCORE` argument." ] ], "acl_categories": [ "@read", "@sortedset", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member" }, { "name": "withscore", "type": "pure-token", "display_text": "withscore", "token": "WITHSCORE", "optional": true } ], "command_flags": [ "readonly", "fast" ] }, "ZREM": { "summary": "Removes one or more members from a sorted set. Deletes the sorted set if all members were removed.", "since": "1.2.0", "group": "sorted-set", "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.", "history": [ [ "2.4.0", "Accepts multiple elements." ] ], "acl_categories": [ "@write", "@sortedset", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member", "multiple": true } ], "command_flags": [ "write", "fast" ] }, "ZREMRANGEBYLEX": { "summary": "Removes members in a sorted set within a lexicographical range. Deletes the sorted set if all members were removed.", "since": "2.8.9", "group": "sorted-set", "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.", "acl_categories": [ "@write", "@sortedset", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "min", "type": "string", "display_text": "min" }, { "name": "max", "type": "string", "display_text": "max" } ], "command_flags": [ "write" ] }, "ZREMRANGEBYRANK": { "summary": "Removes members in a sorted set within a range of indexes. Deletes the sorted set if all members were removed.", "since": "2.0.0", "group": "sorted-set", "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.", "acl_categories": [ "@write", "@sortedset", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer", "display_text": "start" }, { "name": "stop", "type": "integer", "display_text": "stop" } ], "command_flags": [ "write" ] }, "ZREMRANGEBYSCORE": { "summary": "Removes members in a sorted set within a range of scores. Deletes the sorted set if all members were removed.", "since": "1.2.0", "group": "sorted-set", "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.", "acl_categories": [ "@write", "@sortedset", "@slow" ], "arity": 4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RW": true, "delete": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "min", "type": "double", "display_text": "min" }, { "name": "max", "type": "double", "display_text": "max" } ], "command_flags": [ "write" ] }, "ZREVRANGE": { "summary": "Returns members in a sorted set within a range of indexes in reverse order.", "since": "1.2.0", "group": "sorted-set", "complexity": "O(log(N)+M) with N being the number of elements in the sorted set and M the number of elements returned.", "deprecated_since": "6.2.0", "replaced_by": "`ZRANGE` with the `REV` argument", "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "start", "type": "integer", "display_text": "start" }, { "name": "stop", "type": "integer", "display_text": "stop" }, { "name": "withscores", "type": "pure-token", "display_text": "withscores", "token": "WITHSCORES", "optional": true } ], "command_flags": [ "readonly" ], "doc_flags": [ "deprecated" ] }, "ZREVRANGEBYLEX": { "summary": "Returns members in a sorted set within a lexicographical range in reverse order.", "since": "2.8.9", "group": "sorted-set", "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)).", "deprecated_since": "6.2.0", "replaced_by": "`ZRANGE` with the `REV` and `BYLEX` arguments", "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "max", "type": "string", "display_text": "max" }, { "name": "min", "type": "string", "display_text": "min" }, { "name": "limit", "type": "block", "token": "LIMIT", "optional": true, "arguments": [ { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "count", "type": "integer", "display_text": "count" } ] } ], "command_flags": [ "readonly" ], "doc_flags": [ "deprecated" ] }, "ZREVRANGEBYSCORE": { "summary": "Returns members in a sorted set within a range of scores in reverse order.", "since": "2.2.0", "group": "sorted-set", "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)).", "deprecated_since": "6.2.0", "replaced_by": "`ZRANGE` with the `REV` and `BYSCORE` arguments", "history": [ [ "2.1.6", "`min` and `max` can be exclusive." ] ], "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "max", "type": "double", "display_text": "max" }, { "name": "min", "type": "double", "display_text": "min" }, { "name": "withscores", "type": "pure-token", "display_text": "withscores", "token": "WITHSCORES", "optional": true }, { "name": "limit", "type": "block", "token": "LIMIT", "optional": true, "arguments": [ { "name": "offset", "type": "integer", "display_text": "offset" }, { "name": "count", "type": "integer", "display_text": "count" } ] } ], "command_flags": [ "readonly" ], "doc_flags": [ "deprecated" ] }, "ZREVRANK": { "summary": "Returns the index of a member in a sorted set ordered by descending scores.", "since": "2.0.0", "group": "sorted-set", "complexity": "O(log(N))", "history": [ [ "7.2.0", "Added the optional `WITHSCORE` argument." ] ], "acl_categories": [ "@read", "@sortedset", "@fast" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member" }, { "name": "withscore", "type": "pure-token", "display_text": "withscore", "token": "WITHSCORE", "optional": true } ], "command_flags": [ "readonly", "fast" ] }, "ZSCAN": { "summary": "Iterates over members and scores of a sorted set.", "since": "2.8.0", "group": "sorted-set", "complexity": "O(1) for every call. O(N) for a complete iteration, including enough command calls for the cursor to return back to 0. N is the number of elements inside the collection.", "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "cursor", "type": "integer", "display_text": "cursor" }, { "name": "pattern", "type": "pattern", "display_text": "pattern", "token": "MATCH", "optional": true }, { "name": "count", "type": "integer", "display_text": "count", "token": "COUNT", "optional": true } ], "command_flags": [ "readonly" ], "hints": [ "nondeterministic_output" ] }, "ZSCORE": { "summary": "Returns the score of a member in a sorted set.", "since": "1.2.0", "group": "sorted-set", "complexity": "O(1)", "acl_categories": [ "@read", "@sortedset", "@fast" ], "arity": 3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "RO": true, "access": true } ], "arguments": [ { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0 }, { "name": "member", "type": "string", "display_text": "member" } ], "command_flags": [ "readonly", "fast" ] }, "ZUNION": { "summary": "Returns the union of multiple sorted sets.", "since": "6.2.0", "group": "sorted-set", "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.", "acl_categories": [ "@read", "@sortedset", "@slow" ], "arity": -3, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RO": true, "access": true } ], "arguments": [ { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 0, "multiple": true }, { "name": "weight", "type": "integer", "display_text": "weight", "token": "WEIGHTS", "optional": true, "multiple": true }, { "name": "aggregate", "type": "oneof", "token": "AGGREGATE", "optional": true, "arguments": [ { "name": "sum", "type": "pure-token", "display_text": "sum", "token": "SUM" }, { "name": "min", "type": "pure-token", "display_text": "min", "token": "MIN" }, { "name": "max", "type": "pure-token", "display_text": "max", "token": "MAX" } ] }, { "name": "withscores", "type": "pure-token", "display_text": "withscores", "token": "WITHSCORES", "optional": true } ], "command_flags": [ "readonly", "movablekeys" ] }, "ZUNIONSTORE": { "summary": "Stores the union of multiple sorted sets in a key.", "since": "2.0.0", "group": "sorted-set", "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.", "acl_categories": [ "@write", "@sortedset", "@slow" ], "arity": -4, "key_specs": [ { "begin_search": { "type": "index", "spec": { "index": 1 } }, "find_keys": { "type": "range", "spec": { "lastkey": 0, "keystep": 1, "limit": 0 } }, "OW": true, "update": true }, { "begin_search": { "type": "index", "spec": { "index": 2 } }, "find_keys": { "type": "keynum", "spec": { "keynumidx": 0, "firstkey": 1, "keystep": 1 } }, "RO": true, "access": true } ], "arguments": [ { "name": "destination", "type": "key", "display_text": "destination", "key_spec_index": 0 }, { "name": "numkeys", "type": "integer", "display_text": "numkeys" }, { "name": "key", "type": "key", "display_text": "key", "key_spec_index": 1, "multiple": true }, { "name": "weight", "type": "integer", "display_text": "weight", "token": "WEIGHTS", "optional": true, "multiple": true }, { "name": "aggregate", "type": "oneof", "token": "AGGREGATE", "optional": true, "arguments": [ { "name": "sum", "type": "pure-token", "display_text": "sum", "token": "SUM" }, { "name": "min", "type": "pure-token", "display_text": "min", "token": "MIN" }, { "name": "max", "type": "pure-token", "display_text": "max", "token": "MAX" } ] } ], "command_flags": [ "write", "denyoom", "movablekeys" ] } }