File tree Expand file tree Collapse file tree 4 files changed +58
-12
lines changed Expand file tree Collapse file tree 4 files changed +58
-12
lines changed Original file line number Diff line number Diff line change 9
9
<module name =" Module ngx_http_js_module"
10
10
link =" /en/docs/http/ngx_http_js_module.html"
11
11
lang =" en"
12
- rev =" 47 " >
12
+ rev =" 48 " >
13
13
14
14
<section id =" summary" >
15
15
@@ -646,8 +646,9 @@ Several <literal>js_preload_object</literal> directives can be specified.
646
646
647
647
<directive name =" js_set" >
648
648
<syntax >
649
- <value >$variable</value > <value >function</value > |
650
- <value >module.function</value ></syntax >
649
+ <value >$variable</value >
650
+ <value >function</value > | <value >module.function</value >
651
+ [<literal >nocache</literal >]</syntax >
651
652
<default />
652
653
<context >http</context >
653
654
<context >server</context >
@@ -675,6 +676,17 @@ This handler can be used to do some cleanup
675
676
right before the request is freed.
676
677
</para >
677
678
679
+ <para >
680
+ Since <link doc =" ../njs/changes.xml" id =" njs0.8.6" >0.8.6</link >,
681
+ if an optional argument <literal >nocache</literal > is specified,
682
+ the handler is called every time it is referenced.
683
+ Due to current limitations
684
+ of the <link doc =" ngx_http_rewrite_module.xml" >rewrite</link > module,
685
+ when a <literal >nocache</literal > variable is referenced by the
686
+ <link doc =" ngx_http_rewrite_module.xml" id =" set" >set</link > directive
687
+ its handler should always return a fixed-length value.
688
+ </para >
689
+
678
690
<para >
679
691
<note >
680
692
As the <literal >js_set</literal > handler
Original file line number Diff line number Diff line change 9
9
<module name =" Module ngx_stream_js_module"
10
10
link =" /en/docs/stream/ngx_stream_js_module.html"
11
11
lang =" en"
12
- rev =" 45 " >
12
+ rev =" 46 " >
13
13
14
14
<section id =" summary" >
15
15
632
632
633
633
<directive name =" js_set" >
634
634
<syntax >
635
- <value >$variable</value > <value >function</value > |
636
- <value >module.function</value ></syntax >
635
+ <value >$variable</value >
636
+ <value >function</value > | <value >module.function</value >
637
+ [<literal >nocache</literal >]</syntax >
637
638
<default />
638
639
<context >stream</context >
639
640
<context >server</context >
@@ -660,6 +661,17 @@ This handler can be used to do some cleanup
660
661
right before the request is freed.
661
662
</para >
662
663
664
+ <para >
665
+ Since <link doc =" ../njs/changes.xml" id =" njs0.8.6" >0.8.6</link >, when
666
+ optional argument <literal >nocache</literal > is provided the handler
667
+ is called every time it is referenced.
668
+ Due to current limitations
669
+ of the <link doc =" ngx_stream_rewrite_module.xml" >rewrite</link > module,
670
+ when a <literal >nocache</literal > variable is referenced by the
671
+ <link doc =" ngx_stream_set_module.xml" id =" set" >set</link > directive
672
+ its handler should always return a fixed-length value.
673
+ </para >
674
+
663
675
<para >
664
676
<note >
665
677
As the <literal >js_set</literal > handler
Original file line number Diff line number Diff line change 9
9
<module name =" Модуль ngx_http_js_module"
10
10
link =" /ru/docs/http/ngx_http_js_module.html"
11
11
lang =" ru"
12
- rev =" 47 " >
12
+ rev =" 48 " >
13
13
14
14
<section id =" summary" >
15
15
@@ -648,8 +648,9 @@ js_preload_object map.json;
648
648
649
649
<directive name =" js_set" >
650
650
<syntax >
651
- <value >$переменная</value > <value >функция</value > |
652
- <value >модуль.функция</value ></syntax >
651
+ <value >$переменная</value >
652
+ <value >функция</value > | <value >модуль.функция</value >
653
+ [<literal >nocache</literal >]</syntax >
653
654
<default />
654
655
<context >http</context >
655
656
<context >server</context >
@@ -677,6 +678,16 @@ js_preload_object map.json;
677
678
непосредственно перед освобождением запроса.
678
679
</para >
679
680
681
+ <para >
682
+ Начиная с <link doc =" ../njs/changes.xml" id =" njs0.8.6" >0.8.6</link >,
683
+ если указан необязательный параметр <literal >nocache</literal >, то
684
+ обработчик выполняется каждый раз при обращении к переменной.
685
+ Из-за ограничения модуля <link doc =" ngx_http_rewrite_module.xml" >rewrite</link >
686
+ при обращении к <literal >nocache</literal >-переменной при помощи
687
+ директивы <link doc =" ngx_http_rewrite_module.xml" id =" set" >set</link >,
688
+ обработчик должен возвращать значение фиксированной длины.
689
+ </para >
690
+
680
691
<para >
681
692
<note >
682
693
Так как обработчик <literal >js_set</literal >
Original file line number Diff line number Diff line change 9
9
<module name =" Модуль ngx_stream_js_module"
10
10
link =" /ru/docs/stream/ngx_stream_js_module.html"
11
11
lang =" ru"
12
- rev =" 45 " >
12
+ rev =" 46 " >
13
13
14
14
<section id =" summary" >
15
15
@@ -632,8 +632,9 @@ async function handler(s) {
632
632
633
633
<directive name =" js_set" >
634
634
<syntax >
635
- <value >$переменная</value > <value >функция</value > |
636
- <value >модуль.функция</value ></syntax >
635
+ <value >$переменная</value >
636
+ <value >функция</value > | <value >модуль.функция</value >
637
+ [<literal >nocache</literal >]</syntax >
637
638
<default />
638
639
<context >stream</context >
639
640
<context >server</context >
@@ -660,6 +661,16 @@ async function handler(s) {
660
661
непосредственно перед освобождением запроса.
661
662
</para >
662
663
664
+ <para >
665
+ Начиная с <link doc =" ../njs/changes.xml" id =" njs0.8.6" >0.8.6</link >,
666
+ если указан необязательный параметр <literal >nocache</literal >, то
667
+ обработчик выполняется каждый раз при обращении к переменной.
668
+ Из-за ограничения модуля <link doc =" ngx_stream_rewrite_module.xml" >rewrite</link >
669
+ при обращении к <literal >nocache</literal >-переменной при помощи
670
+ директивы <link doc =" ngx_stream_rewrite_module.xml" id =" set" >set</link >,
671
+ обработчик должен возвращать значение фиксированной длины.
672
+ </para >
673
+
663
674
<para >
664
675
<note >
665
676
Так как обработчик <literal >js_set</literal >
You can’t perform that action at this time.
0 commit comments