diff --git a/content/develop/using-commands/transactions.md b/content/develop/using-commands/transactions.md index d92a48e0d4..88336fbf12 100644 --- a/content/develop/using-commands/transactions.md +++ b/content/develop/using-commands/transactions.md @@ -218,6 +218,11 @@ new race. This form of locking is called _optimistic locking_. In many use cases, multiple clients will be accessing different keys, so collisions are unlikely – usually there's no need to repeat the operation. +Starting with version 8.4, Redis offers new atomic compare-and-set and compare-and-delete commands for string keys. +A client can use a single ([`SET`]({{< relref "/commands/set" >}}) command with the `IFEQ`/`IFNE`/`IFDEQ`/`IFDNE` options to atomically update a string key only if its value has not changed since it was fetched. +This is much simpler and faster. +Similarly, a client can use a single `[`DELEX`]({{< relref "/commands/delex" >}})` command for compare-and-delete: atomically deleting a string key if its value hasn't changed since it was fetched. + ## WATCH explained So what is [`WATCH`]({{< relref "/commands/watch" >}}) really about? It is a command that will