Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

docs: documented the new shdict:flush_expired() method. bumped the ve…

…rsion to 0.6.3. also mentioned lua-resty-dns in the SEE ALSO section.
  • Loading branch information...
commit a819a192e7cd834189bd2b88e0575ead3cea7bdc 1 parent f09867d
@agentzh agentzh authored
Showing with 55 additions and 7 deletions.
  1. +24 −3 README
  2. +16 −2 README.markdown
  3. +15 −2 doc/HttpLuaModule.wiki
View
27 README
@@ -8,8 +8,8 @@ Status
This module is under active development and is production ready.
Version
- This document describes ngx_lua v0.6.2
- (<https://github.com/chaoslawful/lua-nginx-module/tags>) released on 22
+ This document describes ngx_lua v0.6.3
+ (<https://github.com/chaoslawful/lua-nginx-module/tags>) released on 25
August 2012.
Synopsis
@@ -3613,6 +3613,8 @@ Nginx API for Lua
* flush_all
+ * flush_expired
+
Here is an example:
http {
@@ -3850,7 +3852,23 @@ Nginx API for Lua
This feature was first introduced in the "v0.5.0rc17" release.
- See also ngx.shared.DICT.
+ See also ngx.shared.DICT.flush_expired and ngx.shared.DICT.
+
+ ngx.shared.DICT.flush_expired
+ syntax: *flushed = ngx.shared.DICT:flush_expired(max_count?)*
+
+ context: *init_by_lua*, set_by_lua*, rewrite_by_lua*, access_by_lua*,
+ content_by_lua*, header_filter_by_lua*, body_filter_by_lua*,
+ log_by_lua**
+
+ Flushes out the expired items in the dictionary, up to the maximal
+ number specified by the optional "max_count" argument. When the
+ "max_count" argument is given 0 or not given at all, then it means
+ unlimited. Returns the number of items that have actually been flushed.
+
+ This feature was first introduced in the "v0.6.3" release.
+
+ See also ngx.shared.DICT.flush_all and ngx.shared.DICT.
ngx.socket.udp
syntax: *udpsock = ngx.socket.udp()*
@@ -5274,6 +5292,9 @@ See Also
* lua-resty-upload (<http://github.com/agentzh/lua-resty-upload>)
library based on ngx_lua cosocket.
+ * lua-resty-dns (<http://github.com/agentzh/lua-resty-dns>) library
+ based on ngx_lua cosocket.
+
* lua-resty-string (<http://github.com/agentzh/lua-resty-string>)
library based on LuaJIT FFI (<http://luajit.org/ext_ffi.html>).
View
18 README.markdown
@@ -18,7 +18,7 @@ This module is under active development and is production ready.
Version
=======
-This document describes ngx_lua [v0.6.2](https://github.com/chaoslawful/lua-nginx-module/tags) released on 22 August 2012.
+This document describes ngx_lua [v0.6.3](https://github.com/chaoslawful/lua-nginx-module/tags) released on 25 August 2012.
Synopsis
========
@@ -3355,6 +3355,7 @@ The resulting object `dict` has the following methods:
* [incr](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.incr)
* [delete](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.delete)
* [flush_all](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.flush_all)
+* [flush_expired](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.flush_expired)
Here is an example:
@@ -3544,7 +3545,19 @@ Flushes out all the items in the dictionary.
This feature was first introduced in the `v0.5.0rc17` release.
-See also [ngx.shared.DICT](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT).
+See also [ngx.shared.DICT.flush_expired](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.flush_expired) and [ngx.shared.DICT](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT).
+
+ngx.shared.DICT.flush_expired
+-----------------------------
+**syntax:** *flushed = ngx.shared.DICT:flush_expired(max_count?)*
+
+**context:** *init_by_lua*, set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua*, log_by_lua**
+
+Flushes out the expired items in the dictionary, up to the maximal number specified by the optional `max_count` argument. When the `max_count` argument is given `0` or not given at all, then it means unlimited. Returns the number of items that have actually been flushed.
+
+This feature was first introduced in the `v0.6.3` release.
+
+See also [ngx.shared.DICT.flush_all](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.flush_all) and [ngx.shared.DICT](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT).
ngx.socket.udp
--------------
@@ -4654,6 +4667,7 @@ See Also
* [lua-resty-redis](http://github.com/agentzh/lua-resty-redis) library based on ngx_lua cosocket.
* [lua-resty-mysql](http://github.com/agentzh/lua-resty-mysql) library based on ngx_lua cosocket.
* [lua-resty-upload](http://github.com/agentzh/lua-resty-upload) library based on ngx_lua cosocket.
+* [lua-resty-dns](http://github.com/agentzh/lua-resty-dns) library based on ngx_lua cosocket.
* [lua-resty-string](http://github.com/agentzh/lua-resty-string) library based on [LuaJIT FFI](http://luajit.org/ext_ffi.html).
* [Routing requests to different MySQL queries based on URI arguments](http://openresty.org/#RoutingMySQLQueriesBasedOnURIArgs)
* [Dynamic Routing Based on Redis and Lua](http://openresty.org/#DynamicRoutingBasedOnRedis)
View
17 doc/HttpLuaModule.wiki
@@ -10,7 +10,7 @@ This module is under active development and is production ready.
= Version =
-This document describes ngx_lua [https://github.com/chaoslawful/lua-nginx-module/tags v0.6.2] released on 22 August 2012.
+This document describes ngx_lua [https://github.com/chaoslawful/lua-nginx-module/tags v0.6.3] released on 25 August 2012.
= Synopsis =
<geshi lang="nginx">
@@ -3240,6 +3240,7 @@ The resulting object <code>dict</code> has the following methods:
* [[#ngx.shared.DICT.incr|incr]]
* [[#ngx.shared.DICT.delete|delete]]
* [[#ngx.shared.DICT.flush_all|flush_all]]
+* [[#ngx.shared.DICT.flush_expired|flush_expired]]
Here is an example:
@@ -3422,7 +3423,18 @@ Flushes out all the items in the dictionary.
This feature was first introduced in the <code>v0.5.0rc17</code> release.
-See also [[#ngx.shared.DICT|ngx.shared.DICT]].
+See also [[#ngx.shared.DICT.flush_expired|ngx.shared.DICT.flush_expired]] and [[#ngx.shared.DICT|ngx.shared.DICT]].
+
+== ngx.shared.DICT.flush_expired ==
+'''syntax:''' ''flushed = ngx.shared.DICT:flush_expired(max_count?)''
+
+'''context:''' ''init_by_lua*, set_by_lua*, rewrite_by_lua*, access_by_lua*, content_by_lua*, header_filter_by_lua*, body_filter_by_lua*, log_by_lua*''
+
+Flushes out the expired items in the dictionary, up to the maximal number specified by the optional <code>max_count</code> argument. When the <code>max_count</code> argument is given <code>0</code> or not given at all, then it means unlimited. Returns the number of items that have actually been flushed.
+
+This feature was first introduced in the <code>v0.6.3</code> release.
+
+See also [[#ngx.shared.DICT.flush_all|ngx.shared.DICT.flush_all]] and [[#ngx.shared.DICT|ngx.shared.DICT]].
== ngx.socket.udp ==
'''syntax:''' ''udpsock = ngx.socket.udp()''
@@ -4482,6 +4494,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* [http://github.com/agentzh/lua-resty-redis lua-resty-redis] library based on ngx_lua cosocket.
* [http://github.com/agentzh/lua-resty-mysql lua-resty-mysql] library based on ngx_lua cosocket.
* [http://github.com/agentzh/lua-resty-upload lua-resty-upload] library based on ngx_lua cosocket.
+* [http://github.com/agentzh/lua-resty-dns lua-resty-dns] library based on ngx_lua cosocket.
* [http://github.com/agentzh/lua-resty-string lua-resty-string] library based on [http://luajit.org/ext_ffi.html LuaJIT FFI].
* [http://openresty.org/#RoutingMySQLQueriesBasedOnURIArgs Routing requests to different MySQL queries based on URI arguments]
* [http://openresty.org/#DynamicRoutingBasedOnRedis Dynamic Routing Based on Redis and Lua]
Please sign in to comment.
Something went wrong with that request. Please try again.