Closed alexist closed 11 months ago
Implementation of #24
The lua.shared semantic has evolved. The method incr now accept an optional parameter init_ttl :
syntax: newval, err, forcible? = ngx.shared.DICT:incr(key, value, init?, init_ttl?)
init_ttl allow to create the missing key with a ttl and avoid to make another call to handle expiration (incr than expire)
remaining, err = dict:incr(key, -1, limit, window)
A new parameter has been added to INCR command in order to be compliant with lua.shared.DICT
Implementation of #24
The lua.shared semantic has evolved. The method incr now accept an optional parameter init_ttl :
syntax: newval, err, forcible? = ngx.shared.DICT:incr(key, value, init?, init_ttl?)
init_ttl allow to create the missing key with a ttl and avoid to make another call to handle expiration (incr than expire)
remaining, err = dict:incr(key, -1, limit, window)
A new parameter has been added to INCR command in order to be compliant with lua.shared.DICT