Conversation
|
@splitice Thanks for your contribution! I'll look into this :) |
|
@splitice I think it better to let the second option arg to be May be we can add |
|
option arg - I dont disagree that its possibly a good idea. I am however not sure if I could port that to the C version of the module. I'll wat for @agentzh's input first though. expire command - personally I've found in lots of work that I have done the requirement to increment and "bump" up the expire time to be extremely common, especially in counters or limits. An expire command is probably a good idea, I do however like it in the incr, it also makes handling possible race conditions easier :) |
|
Oh wait, thats a pull request. 👍 No code requirement from me :) |
|
2016-01-04 12:25 GMT+08:00 Mathew Heard notifications@github.com:
|
|
I'm fine with |
|
personally if you went the init path I would prefer an options style array, at that point I feel the method is getting a bit to complex with optional fields, that also leaves room for more expansion. Such as: |
|
@splitice I understand that concern. Options tables are generally more expensive than passed-by-position arguments though :) |
|
True, And I certainly agree since I use incr in some performance sensitive paths. One other point, I would probably put init fourth. Popularity wise I would expect it to be less used. |
|
@splitice Personally I use |
|
One more quick fix applied, the default value is inconsistent between resty core and the shared dict. Defaulted it to one for compatibility. |
# Conflicts: # lib/resty/core/shdict.lua # t/shdict.t
upgrade nginx
Added expttime to incr, the behaviour of this pull request matches that of my pending pull request for the lua module