|
8 | 8 | This module is under active development and is production ready. |
9 | 9 |
|
10 | 10 | Version |
11 | | - This document describes ngx_lua v0.7.2 |
12 | | - (<https://github.com/chaoslawful/lua-nginx-module/tags>) released on 17 |
| 11 | + This document describes ngx_lua v0.7.3 |
| 12 | + (<https://github.com/chaoslawful/lua-nginx-module/tags>) released on 30 |
13 | 13 | October 2012. |
14 | 14 |
|
15 | 15 | Synopsis |
@@ -115,7 +115,7 @@ Synopsis |
115 | 115 | location /foo { |
116 | 116 | rewrite_by_lua ' |
117 | 117 | res = ngx.location.capture("/memc", |
118 | | - { args = { cmd = 'incr', key = ngx.var.uri } } |
| 118 | + { args = { cmd = "incr", key = ngx.var.uri } } |
119 | 119 | ) |
120 | 120 | '; |
121 | 121 |
|
@@ -3955,6 +3955,26 @@ Nginx API for Lua |
3955 | 3955 |
|
3956 | 3956 | See also ngx.shared.DICT.flush_all and ngx.shared.DICT. |
3957 | 3957 |
|
| 3958 | + ngx.shared.DICT.get_keys |
| 3959 | + syntax: *keys = ngx.shared.DICT:get_keys(max_count?)* |
| 3960 | + |
| 3961 | + context: *init_by_lua*, set_by_lua*, rewrite_by_lua*, access_by_lua*, |
| 3962 | + content_by_lua*, header_filter_by_lua*, body_filter_by_lua*, |
| 3963 | + log_by_lua** |
| 3964 | + |
| 3965 | + Fetch a list of the keys from the dictionary, up to "<max_count>". |
| 3966 | + |
| 3967 | + By default, only the first 1024 keys (if any) are returned. When the |
| 3968 | + "<max_count>" argument is given the value 0, then all the keys will be |
| 3969 | + returned even there is more than 1024 keys in the dictionary. |
| 3970 | + |
| 3971 | + WARNING Be careful when calling this method on dictionaries with a |
| 3972 | + really huge number of keys. This method may lock the dictionary for |
| 3973 | + quite a while and block all the nginx worker processes that are trying |
| 3974 | + to access the dictionary. |
| 3975 | + |
| 3976 | + This feature was first introduced in the "v0.7.3" release. |
| 3977 | + |
3958 | 3978 | ngx.socket.udp |
3959 | 3979 | syntax: *udpsock = ngx.socket.udp()* |
3960 | 3980 |
|
@@ -5661,5 +5681,5 @@ See Also |
5661 | 5681 | * The ngx_openresty bundle (<http://openresty.org>) |
5662 | 5682 |
|
5663 | 5683 | Translations |
5664 | | - * Chinese |
| 5684 | + * Chinese (still in progress) |
5665 | 5685 |
|
0 commit comments