aboutsummaryrefslogtreecommitdiff
path: root/nginx/ngx_http_js_module.c
diff options
context:
space:
mode:
authorDmitry Volyntsev <xeioex@nginx.com>2025-05-14 18:16:15 -0700
committerDmitry Volyntsev <xeioexception@gmail.com>2025-05-22 16:54:29 -0700
commiteca03622a5d77d73ef7d89610c906dad5628c37e (patch)
tree746bbfbb6eb18c78df154f501defe8c98fd5b6a5 /nginx/ngx_http_js_module.c
parentbc3b91cda9497717ebd1c150f53e4a37e88b3958 (diff)
downloadnjs-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.c4
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;
}