Hello!
On Mon, Nov 16, 2015 at 11:14 PM, RJoshi wrote:
> In my application, I am using ngx.shared.DICT cache and user data are
> retrieved from MySQL.
> Can I use resty.lock to lock the function which is retrieving data from
> MySQL?
>
I don't understand why you need this. Are you trying to ensure that
only one MySQL connection is used for all the nginx worker processes
in a single server instance? This can enforce all your client requests
queueing serially, which can be a really bad thing for performance.
Be very careful about Lua exceptions aborting your "critical sections"
and the timeout threshold of the lock itself.
Regards,
-agentzh