summaryrefslogtreecommitdiffhomepage
path: root/src/stream
diff options
context:
space:
mode:
authorDmitry Plotnikov <d.plotnikov@f5.com>2025-10-21 19:48:36 +0000
committerdplotnikov-f5 <67346902+dplotnikov-f5@users.noreply.github.com>2025-10-24 15:06:54 -0700
commitac72ca60c773a9ab6f3c6344ac1f2c03ca2b3201 (patch)
treee50b77fbecbbc10b00e717a17bddb1f1b8012e93 /src/stream
parent71f8eb52b7746d6d8ddeb6efab5fc115c187be31 (diff)
downloadnginx-ac72ca60c773a9ab6f3c6344ac1f2c03ca2b3201.tar.gz
nginx-ac72ca60c773a9ab6f3c6344ac1f2c03ca2b3201.tar.bz2
Geo: the "volatile" parameter.
Similar to map's volatile parameter, creates a non-cacheable geo variable.
Diffstat (limited to 'src/stream')
-rw-r--r--src/stream/ngx_stream_geo_module.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/stream/ngx_stream_geo_module.c b/src/stream/ngx_stream_geo_module.c
index 2324bef0d..c109dc72e 100644
--- a/src/stream/ngx_stream_geo_module.c
+++ b/src/stream/ngx_stream_geo_module.c
@@ -61,6 +61,7 @@ typedef struct {
unsigned outside_entries:1;
unsigned allow_binary_include:1;
unsigned binary_include:1;
+ unsigned no_cacheable:1;
} ngx_stream_geo_conf_ctx_t;
@@ -433,6 +434,7 @@ ngx_stream_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
+ sizeof(ngx_stream_variable_value_t)
+ 0x10000 * sizeof(ngx_stream_geo_range_t *);
ctx.allow_binary_include = 1;
+ ctx.no_cacheable = 0;
save = *cf;
cf->pool = pool;
@@ -448,6 +450,10 @@ ngx_stream_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
goto failed;
}
+ if (ctx.no_cacheable) {
+ var->flags |= NGX_STREAM_VAR_NOCACHEABLE;
+ }
+
if (ctx.ranges) {
if (ctx.high.low && !ctx.binary_include) {
@@ -583,6 +589,12 @@ ngx_stream_geo(ngx_conf_t *cf, ngx_command_t *dummy, void *conf)
goto done;
}
+
+ else if (ngx_strcmp(value[0].data, "volatile") == 0) {
+ ctx->no_cacheable = 1;
+ rv = NGX_CONF_OK;
+ goto done;
+ }
}
if (cf->args->nelts != 2) {