# HG changeset patch # User Yaroslav Zhuravlev # Date 1571241744 -10800 # Node ID d58fc33a0830f904c150098d8c0f9bbf3f55e7c1 # Parent 9d4b00f3ad2b5fb499bc071fd050f315a83efbec Improved description of stream keyval types. diff --git a/xml/en/docs/stream/ngx_stream_keyval_module.xml b/xml/en/docs/stream/ngx_stream_keyval_module.xml --- a/xml/en/docs/stream/ngx_stream_keyval_module.xml +++ b/xml/en/docs/stream/ngx_stream_keyval_module.xml @@ -9,7 +9,7 @@ + rev="6">
@@ -75,6 +75,9 @@ stream { 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. @@ -111,15 +114,33 @@ the time after which key-value pairs are -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 + + +