I have created a redis lua script to execute a command based on key data type :-
local keyType = redis.call("TYPE", KEYS[1])
if (keyType == "string")
then
return redis.call("GET",KEYS[1])
else
return nil
end
It is returning null every time I am executing it.Can any please help in correcting the script.