DigestBytes computes the xxh3 hash of the given byte slice. This produces the same hash as the Redis DIGEST command, allowing you to calculate digests client-side without making a Redis call. This is useful for optimistic locking with SetIFDEQ, SetIFDNE, and DelExArgs.
(data []byte)
| 18 | // calculate digests client-side without making a Redis call. |
| 19 | // This is useful for optimistic locking with SetIFDEQ, SetIFDNE, and DelExArgs. |
| 20 | func DigestBytes(data []byte) uint64 { |
| 21 | return xxh3.Hash(data) |
| 22 | } |
| 23 | |
| 24 | // DigestString computes the xxh3 hash of the given string. |
| 25 | // This produces the same hash as the Redis DIGEST command, allowing you to |