Open yitony opened 8 years ago
@yitony Yes, setting an exptime helps saving shm storage in some cases. Will you create a pull request for that? Thanks!
Regarding the uncommit
method, it is documented (well, I've just fixed a typo in the docs and added some more stuff):
https://github.com/openresty/lua-resty-limit-traffic/blob/master/lib/resty/limit/req.md#uncommit
on line 114 of req.lua
I think it will save mem if you set a expire time on the key, like below dict:set(key, ffi_str(rec_cdata, rec_size),60)
same advise on con.lua ,but you need to change add to set
also ,I can't figure out the uncommit mechanism in req.lua ,where and when should I call uncommit?