]> git.kaiwu.me - njs.git/commit
Modules: preserved per-entry TTL on shared dict incr() calls.
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 12 Mar 2026 23:50:34 +0000 (16:50 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Wed, 18 Mar 2026 01:14:53 +0000 (18:14 -0700)
commit8f42e991a2528ed64663599ffd76e66988b8f126
treed81e8903b6bd50508c3545cdb9fa84eea394f2ff
parentcf376bf047d658fb5a95ec4b4ae57550e6f84843
Modules: preserved per-entry TTL on shared dict incr() calls.

Previously, incr() without an explicit timeout argument always
reset the entry expiry to the directive default, discarding any
per-entry timeout set by a prior add(), set(), or incr() call.

This aligns the behavior with Redis INCR and OpenResty
ngx.shared.DICT:incr() where value mutation does not touch the
existing TTL.  An explicit timeout argument still updates it.
nginx/ngx_js_shared_dict.c
nginx/t/js_shared_dict_state_timeout.t