I am using lua script to do 2 operations belonging to same key. Running Redis in cluster mode. Using java jedis library to connect to the Redis cluster.
The syntax for loading lua script is as below
jedisCluster.loadScript(<ScriptString>, <Key>);
It returns a SHA value which I can use in evalsha function on jedis cluster as below
jedisCluster.evalsha(<ShaValue>, <Key Count>, <key>)
I am handling NoScript error when executing above method and will load the script again.
Question: If I am loading the same script with different key values will the SHA value is different? If the two keys land up in different cluster then the SHA value is different?
I am trying to save this SHA value in string use it for all keys.
I know the SHA of a string will be same but I am not sure if redis adding any extra information to the script before generating the SHA.