-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add evalLua method in RedisAPI #382
base: master
Are you sure you want to change the base?
Conversation
I'm not sure this is the right way. The client was build with idea of being as close to the protocol as possible so there's just a The redis.send(LuaScript.create("script", args)) To perform hashing it's better to use |
Also the automatic recovery |
Thanks for the comments, here I have some questions or descriptions:
Also, if add evalLua for automatic run @pmlopes @tsegismont Could you provide some suggestions? Thanks! |
Motivation:
Add a convenient method to eval lua script directly, avoid the load-evalsha steps.
Because redis use sha1 to compute script hash, so we can compute it in our client and directly try it wit a
evalsha
. If failed with a NOSCRIPT error, we can retry witheval
and it will cache script, so next time we try evalsha will success.