Dear All,
I'm using traditional error catching format when is necessary to handle errors.
local ok, err = red:connect(redis_ip, redis_port)
if not ok then
ngx_log(ngx_ERR, "Could not connect to redis: ", err)
end
I can create an error function and use xpcall to handle these codes
xpcall(function ()
local redis = require "redis"
Red = redis.connect(redis_ip, redis_port)
Red:auth(redis_auth)
end, error)
but performance is very crucial for us, do you know if I replace the old co=
de the performance goes up, down or there is no difference in that?
Thanks