DigestString computes the xxh3 hash of the given string. 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.
(s string)
| 26 | // calculate digests client-side without making a Redis call. |
| 27 | // This is useful for optimistic locking with SetIFDEQ, SetIFDNE, and DelExArgs. |
| 28 | func DigestString(s string) uint64 { |
| 29 | return xxh3.HashString(s) |
| 30 | } |
no outgoing calls