# HG changeset patch # User Yaroslav Zhuravlev # Date 1571150803 -10800 # Node ID 9d4b00f3ad2b5fb499bc071fd050f315a83efbec # Parent 437350febcb73908484b2ea04f0effdb7fe3a482 Improved description of keyval types. diff -r 437350febcb7 -r 9d4b00f3ad2b xml/en/docs/http/ngx_http_keyval_module.xml --- a/xml/en/docs/http/ngx_http_keyval_module.xml Mon Oct 07 16:05:26 2019 +0000 +++ b/xml/en/docs/http/ngx_http_keyval_module.xml Tue Oct 15 17:46:43 2019 +0300 @@ -9,7 +9,7 @@ + rev="6">
@@ -69,6 +69,9 @@ Creates a new $variable whose value is looked up by the key in the key-value database. Strings are matched ignoring the case. +Matching rules are defined by the +type parameter of the +keyval_zone directive. The database is stored in a shared memory zone specified by the zone parameter. @@ -105,15 +108,33 @@ -The optional type parameter (1.17.1) specifies -the type of the key: -a string (default) or ip. -For the ip type, -the key must be the textual representation of an IP address -specified in CIDR notation. -In this case, -an additional index optimized for matching IP addresses and networks is used -in evaluating a variable. +The optional type parameter (1.17.1) activates +an extra index optimized for matching the key of a certain type +and defines matching rules when evaluating +a keyval $variable. + +The index is stored in the same shared memory zone +and thus requires additional storage. + + + + +type=string + +default, no index is enabled; +variable lookup is performed using exact match +of the record key and a search key + + +type=ip + +the search key is the textual representation of IPv4 or IPv6 address +or CIDR range; +to match a record key, the search key must belong to a subnet +specified by a record key or exactly match an IP address + + +