]> git.kaiwu.me - nginx.git/commit
Map: the "volatile" parameter.
authorRuslan Ermilov <ru@nginx.com>
Thu, 8 Dec 2016 14:51:49 +0000 (17:51 +0300)
committerRuslan Ermilov <ru@nginx.com>
Thu, 8 Dec 2016 14:51:49 +0000 (17:51 +0300)
commit72ace363184d4768627c2fd2b0a5236887cdc036
tree96097d30c93cb341033a71164caf41d6cfee4149
parent41f06845cf5373d6a86e383f946006fd4ee87137
Map: the "volatile" parameter.

By default, "map" creates cacheable variables [1].  With this
parameter it creates a non-cacheable variable.

An original idea was to deduce the cacheability of the "map"
variable by checking the cacheability of variables specified
in source and resulting values, but it turned to be too hard.
For example, a cacheable variable can be overridden with the
"set" directive or with the SSI "set" command.  Also, keeping
"map" variables cacheable by default is good for performance
reasons.  This required adding a new parameter.

[1] Before db699978a33f (1.11.0), the cacheability of the
"map" variable could vary depending on the cacheability of
variables specified in resulting values (ticket #1090).
This is believed to be a bug rather than a feature.
src/http/modules/ngx_http_map_module.c
src/stream/ngx_stream_map_module.c