-
Notifications
You must be signed in to change notification settings - Fork 270
DOC-5720: add new MSETEX command page #2310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,150 @@ | ||
| --- | ||
| acl_categories: | ||
| - '@write' | ||
| - '@string' | ||
| - '@slow' | ||
| arguments: | ||
| - display_text: numkeys | ||
| name: numkeys | ||
| type: integer | ||
| - arguments: | ||
| - display_text: key | ||
| key_spec_index: 0 | ||
| name: key | ||
| type: key | ||
| - display_text: value | ||
| name: value | ||
| type: string | ||
| multiple: true | ||
| name: data | ||
| type: block | ||
| - arguments: | ||
| - display_text: nx | ||
| name: nx | ||
| token: NX | ||
| type: pure-token | ||
| - display_text: xx | ||
| name: xx | ||
| token: XX | ||
| type: pure-token | ||
| name: condition | ||
| optional: true | ||
| type: oneof | ||
| - arguments: | ||
| - display_text: seconds | ||
| name: seconds | ||
| token: EX | ||
| type: integer | ||
| - display_text: milliseconds | ||
| name: milliseconds | ||
| token: PX | ||
| type: integer | ||
| - display_text: unix-time-seconds | ||
| name: unix-time-seconds | ||
| token: EXAT | ||
| type: unix-time | ||
| - display_text: unix-time-milliseconds | ||
| name: unix-time-milliseconds | ||
| token: PXAT | ||
| type: unix-time | ||
| - display_text: keepttl | ||
| name: keepttl | ||
| token: KEEPTTL | ||
| type: pure-token | ||
| name: expiration | ||
| optional: true | ||
| type: oneof | ||
| arity: -4 | ||
| categories: | ||
| - docs | ||
| - develop | ||
| - stack | ||
| - oss | ||
| - rs | ||
| - rc | ||
| - oss | ||
| - kubernetes | ||
| - clients | ||
| command_flags: | ||
| - write | ||
| - denyoom | ||
| - movablekeys | ||
| complexity: O(N) where N is the number of keys to set. | ||
| description: Atomically sets multiple string keys with a shared expiration in a single | ||
| operation. Supports flexible argument parsing where condition and expiration flags | ||
| can appear in any order. | ||
| group: string | ||
| hidden: false | ||
| hints: | ||
| - request_policy:multi_shard | ||
| - response_policy:all_succeeded | ||
| key_specs: | ||
| - OW: true | ||
| begin_search: | ||
| spec: | ||
| index: 1 | ||
| type: index | ||
| find_keys: | ||
| spec: | ||
| firstkey: 1 | ||
| keynumidx: 0 | ||
| keystep: 2 | ||
| type: keynum | ||
| update: true | ||
| linkTitle: MSETEX | ||
| since: 8.4.0 | ||
| summary: Atomically sets multiple string keys with a shared expiration in a single | ||
| operation. Supports flexible argument parsing where condition and expiration flags | ||
| can appear in any order. | ||
| syntax_fmt: "MSETEX numkeys key value [key value ...] [NX | XX] [EX\_seconds |\n \ | ||
| \ PX\_milliseconds | EXAT\_unix-time-seconds |\n PXAT\_unix-time-milliseconds |\ | ||
| \ KEEPTTL]" | ||
| syntax_str: "key value [key value ...] [NX | XX] [EX\_seconds | PX\_milliseconds |\ | ||
| \ EXAT\_unix-time-seconds | PXAT\_unix-time-milliseconds | KEEPTTL]" | ||
| title: MSETEX | ||
| --- | ||
| Atomically sets multiple string keys with an optional shared expiration in a single operation. Supports flexible argument parsing where condition and expiration flags can appear in any order. | ||
|
|
||
| ## Required arguments | ||
|
|
||
| <details open><summary><code>numkeys</code></summary> | ||
|
|
||
| The number of keys being set. | ||
|
|
||
| </details> | ||
|
|
||
| <details open><summary><code>key value [key value ...]</code></summary> | ||
|
|
||
| A series of key/value pairs. | ||
|
|
||
| </details> | ||
|
|
||
| ## Optional arguments | ||
|
|
||
| <details open><summary><code>condition and expiration flags</code></summary> | ||
|
|
||
| The `MSETEX` command supports a set of options that modify its behavior: | ||
|
|
||
| * `EX seconds` -- Set the specified expiration time in seconds (a positive integer). | ||
| * `PX milliseconds` -- Set the specified expiration time in milliseconds (a positive integer). | ||
| * `EXAT unix-time-seconds` -- Set the specified Unix time in seconds (a positive integer) at which the key(s) will expire. | ||
| * `PXAT unix-time-milliseconds` -- Set the specified Unix time in milliseconds (a positive integer) at which the key(s) will expire. | ||
| * `NX` -- Set the keys and their expiration time only if none of the specified keys exist. | ||
| * `XX` -- Set the keys and their expiration time only if all of the specified keys already exist. | ||
| * `KEEPTTL` -- Retain the time to live associated with the keys. | ||
|
|
||
| </details> | ||
|
|
||
| ## Return information | ||
|
|
||
| {{< multitabs id="return-info" | ||
| tab1="RESP2" | ||
| tab2="RESP3" >}} | ||
|
|
||
| [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): 0 if none of the keys were set; 1 if all of the keys were set. | ||
|
|
||
| -tab-sep- | ||
|
|
||
| [Integer reply]({{< relref "/develop/reference/protocol-spec#integers" >}}): 0 if none of the keys were set; 1 if all of the keys were set. | ||
|
|
||
| {{< /multitabs >}} | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.