Currently it's only possible to set an expiration time to the entire dictionary when creating a new instance:
local obj = resty_lock:new("locks_dict", {exptime = 10})
It would be nice to allow setting an expiration time per key too, like:
local obj = resty_lock:new("reports_locks")
obj:lock("test", {exptime = 10})
So that one dictionary can be used to set multiple keys with a different expiration time:
local obj = resty_lock:new("reports_locks")
obj:lock("test", {exptime = 10})
obj:lock("test2", {exptime = 4})
obj:lock("test3", {exptime = 50})