Skip to content

Commit

Permalink
SET options EX, PX, EXAT, PXAT take positive integer argument (#2617)
Browse files Browse the repository at this point in the history
Clarify that argument is a positive integer, unlike EXPIRE which accepts zero and negative numbers too.
  • Loading branch information
LiorKogan authored Dec 27, 2023
1 parent a8751ba commit d3fdeb6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions commands/set.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Any previous time to live associated with the key is discarded on successful `SE

The `SET` command supports a set of options that modify its behavior:

* `EX` *seconds* -- Set the specified expire time, in seconds.
* `PX` *milliseconds* -- Set the specified expire time, in milliseconds.
* `EXAT` *timestamp-seconds* -- Set the specified Unix time at which the key will expire, in seconds.
* `PXAT` *timestamp-milliseconds* -- Set the specified Unix time at which the key will expire, in milliseconds.
* `EX` *seconds* -- Set the specified expire time, in seconds (a positive integer).
* `PX` *milliseconds* -- Set the specified expire time, in milliseconds (a positive integer).
* `EXAT` *timestamp-seconds* -- Set the specified Unix time at which the key will expire, in seconds (a positive integer).
* `PXAT` *timestamp-milliseconds* -- Set the specified Unix time at which the key will expire, in milliseconds (a positive integer).
* `NX` -- Only set the key if it does not already exist.
* `XX` -- Only set the key if it already exists.
* `KEEPTTL` -- Retain the time to live associated with the key.
Expand Down

0 comments on commit d3fdeb6

Please sign in to comment.