Add documentation for DIGEST and DELEX commands#511
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: romange <3674760+romange@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add documentation for DELEX and DIGEST commands
Add documentation for DIGEST and DELEX commands
Jan 22, 2026
romange
reviewed
Jan 22, 2026
|
|
||
| `DELEX` extends [`DEL`](./del.md) by adding conditional deletion based on value or digest matching. Without conditions, `DELEX key` behaves identically to `DEL key`. | ||
|
|
||
| ### Is DELEX compatible with Redis? |
Contributor
There was a problem hiding this comment.
- remove Redis compatibility questions.
- verify DIGEST output on your examples by running
ghcr.io/dragonflydb/dragonfly-dev:ubuntuand checking the output against this container that supports DIGEST and DELEX commands. - align the examples to have correct digest strings
- Mention for both commands that they are available for Dragonfly v1.37.0 or later
Contributor
Author
There was a problem hiding this comment.
Done in commit dca7180:
- ✅ Removed Redis compatibility questions from both documents
- ✅ Verified all DIGEST outputs using
ghcr.io/dragonflydb/dragonfly-dev:ubuntucontainer and updated examples with correct values - ✅ Aligned all examples with actual digest strings (e.g., "test" → "9ec9f7918d7dfc40", "hello" → "9555e8555c62dcfd", etc.)
- ✅ Added "Availability: Dragonfly v1.37.0 and later" to both command documents
All digest values have been verified against the dev container and are now accurate.
Co-authored-by: romange <3674760+romange@users.noreply.github.com>
romange
approved these changes
Jan 22, 2026
romange
reviewed
Jan 22, 2026
|
|
||
| ### Can DIGEST work with compressed or integer-encoded strings? | ||
|
|
||
| Yes, `DIGEST` handles all string encodings including raw strings, integer-encoded strings, and compressed strings. |
Contributor
There was a problem hiding this comment.
@copilot remove compressed mention as there are no compression of strings in Dragonfly
Contributor
Author
There was a problem hiding this comment.
Done in commit 6e8daf3. Removed all mentions of "compressed" strings from the DIGEST documentation. The FAQ now reads:
"Can DIGEST work with integer-encoded strings?"
"Yes, DIGEST handles all string encodings including raw strings and integer-encoded strings."
Co-authored-by: romange <3674760+romange@users.noreply.github.com>
romange
approved these changes
Jan 22, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Documentation for DIGEST and DELEX Commands
docs/command-reference/strings/digest.mddocs/command-reference/generic/delex.mddocs/command-reference/compatibility.mdto include both commandssrc/components/CompatibilityTable/data.jsonto include both commandsSummary
This PR adds comprehensive documentation for the new
DIGESTandDELEXcommands introduced in dragonflydb/dragonfly#6328. Both commands are available in Dragonfly v1.37.0 and later.DIGEST Command
docs/command-reference/strings/digest.mdDELEX Command
docs/command-reference/generic/delex.mdRecent Changes
Validation
✅ Documentation site builds successfully with
yarn build✅ All digest values verified against actual Dragonfly dev container
✅ Redis compatibility questions removed
✅ Version availability information added
✅ Accurate information about string encoding support
Original prompt
Add Documentation for DELEX and DIGEST Commands
Overview
Add documentation pages for the new
DELEXandDIGESTcommands that were implemented in dragonflydb/dragonfly#6328. These commands are Redis 8.4.0 compatible and enable atomic conditional string operations.Commands to Document
1. DIGEST Command
Location: Create
docs/command-reference/strings/digest.mdCommand Details:
DIGEST keynilif the key does not existWRONGTYPEerror if the key exists but is not a string typeExample Content Structure (follow pattern from
docs/command-reference/strings/get.md):Time complexity: O(N) where N is the length of the string value
ACL categories: @READ, @string, @fast
Parameter Explanations
key: The key whose value should be hashed. Must be a string type.Return Values
nilif the key does not exist.Code Examples
Basic Example
Compute digest of a string value:
Non-Existent Key
If the key does not exist,
DIGESTreturnsnil:dragonfly$> DIGEST non_existent_key (nil)Digest Consistency
The same value always produces the same digest:
Different Values Produce Different Digests
Error on Wrong Type
Best Practices
DIGESTto compare values efficiently without transferring full content over the network.DELEX IFDEQ/IFDNEfor conditional deletions based on digest matching.Common Mistakes
DIGESTon non-string keys will result in aWRONGTYPEerror.FAQs
What hashing algorithm does DIGEST use?
DIGESTuses the XXH3 algorithm, which is a fast, non-cryptographic hash function that produces a 64-bit hash value.Is DIGEST suitable for cryptographic purposes?
No,
DIGESTuses XXH3 which is not a cryptographic hash function. For cryptographic purposes, use dedicated cryptographic hash functions.Can DIGEST work with compressed or integer-encoded strings?
Yes,
DIGESThandles all string encodings including raw strings, integer-encoded strings, and compressed strings.Is DIGEST compatible with Redis?
Yes,
DIGESTis compatible with Redis 8.4.0 and later versions.