Hello!
So your module uses lua-resty-redis, which in turn uses ngx_lua's builtin API cosocket.
What you should be cautious is the scope of cosocket object is limited to a request, since
it uses the request's memory pool. You'd better to instantiate the redis instance once you call
get_redis or set_redis.