Welcome! Log In Create A New Profile

Advanced

Re: njs: how to define a global variable

Dmitry Volyntsev
June 03, 2019 01:44PM
On 29.05.2019 20:02, guy1976 wrote:
> hi
>
> is it possible to define a global variable that will be persist for
> different requests?


Hi Guy,

Currently it is not possible as all njs VM are short-lived (a VM per
request).
If performance is not a serious issue you can use FS API (see
http://nginx.org/en/docs/njs/reference.html#njs_api_fs)


>
> thank you,
> Guy.
>
> Posted at Nginx Forum: https://forum.nginx.org/read.php?2,284350,284350#msg-284350
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

njs: how to define a global variable

guy1976 May 29, 2019 01:02PM

Re: njs: how to define a global variable

Dmitry Volyntsev June 03, 2019 01:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 84
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready