informatikr / hedis

A Redis client library for Haskell.
http://hackage.haskell.org/package/hedis
BSD 3-Clause "New" or "Revised" License
327 stars 121 forks source link

Improved documentation for EVALSHA #162

Closed paf31 closed 3 years ago

paf31 commented 3 years ago

This was confusing me because the existing documentation suggested the first argument was the script itself, but the docs indicate that argument should contain the Base16-encoded SHA1 hash of the script.

I have a little wrapper function which accepts the script itself, and performs the encoding, but you might not like to add something like cryptonite as a dependency here?

See https://redis.io/commands/eval#bandwidth-and-evalsha

k-bx commented 3 years ago

Yeah, something like Rust's Crate feature-flags would be handy here, bringing a dependency for this is too much.

Thanks!