lua-resty-lock
lua-resty-lock copied to clipboard
keep the key never overrides
never overrides the (least recently used) unexpired items in the store when running out of storage in the shared memory zone
I think it's better to expose an option to let the user decide whether to use add
or safe_add
. Not every use case requires such strictness, for example, in the case of cache locks.
@agentzh please take a look at first, add the test case later.