diff options
author | Dmitry Volyntsev <xeioex@nginx.com> | 2025-05-14 18:16:15 -0700 |
---|---|---|
committer | Dmitry Volyntsev <xeioexception@gmail.com> | 2025-05-22 16:54:29 -0700 |
commit | eca03622a5d77d73ef7d89610c906dad5628c37e (patch) | |
tree | 746bbfbb6eb18c78df154f501defe8c98fd5b6a5 /nginx/ngx_http_js_module.c | |
parent | bc3b91cda9497717ebd1c150f53e4a37e88b3958 (diff) | |
download | njs-eca03622a5d77d73ef7d89610c906dad5628c37e.tar.gz njs-eca03622a5d77d73ef7d89610c906dad5628c37e.zip |
Modules: added state file for the shared dictionary.
A new optional state parameter is added for js_shared_dict_zone
directive. state parameter specifies a file that keeps the current state
of the shared dict in the JSON format and makes it persistent
across nginx restarts.
This closes #709 feature request on Github.
Diffstat (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r-- | nginx/ngx_http_js_module.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index 3b493bd1..28798172 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -7738,6 +7738,10 @@ ngx_http_js_init_worker(ngx_cycle_t *cycle) return NGX_ERROR; } + if (ngx_js_dict_init_worker(jmcf) != NGX_OK) { + return NGX_ERROR; + } + return NGX_OK; } |