docs: documented the memory freeing behavior of shdict:flush_all and shdict:flush_expired.

This commit is contained in:
Yichun Zhang (agentzh) 2013-07-17 12:31:15 -07:00
Родитель f36a35d39f
Коммит 4516e5adf9
3 изменённых файлов: 12 добавлений и 3 удалений

7
README
Просмотреть файл

@ -4274,7 +4274,9 @@ Nginx API for Lua
content_by_lua*, header_filter_by_lua*, body_filter_by_lua*,
log_by_lua*, ngx.timer.**
Flushes out all the items in the dictionary.
Flushes out all the items in the dictionary. This method does not
actuall free up all the memory blocks in the dictionary but just marks
all the existing items as expired.
This feature was first introduced in the "v0.5.0rc17" release.
@ -4292,6 +4294,9 @@ Nginx API for Lua
"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.
Unlike the flush_all method, this method actually free up the memory
used by the expired items.
This feature was first introduced in the "v0.6.3" release.
See also ngx.shared.DICT.flush_all and ngx.shared.DICT.

Просмотреть файл

@ -3910,7 +3910,7 @@ ngx.shared.DICT.flush_all
**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*, ngx.timer.**
Flushes out all the items in the dictionary.
Flushes out all the items in the dictionary. This method does not actuall free up all the memory blocks in the dictionary but just marks all the existing items as expired.
This feature was first introduced in the `v0.5.0rc17` release.
@ -3924,6 +3924,8 @@ ngx.shared.DICT.flush_expired
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.
Unlike the [flush_all](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.flush_all) method, this method actually free up the memory used by the expired items.
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).

Просмотреть файл

@ -3778,7 +3778,7 @@ See also [[#ngx.shared.DICT|ngx.shared.DICT]].
'''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*, ngx.timer.*''
Flushes out all the items in the dictionary.
Flushes out all the items in the dictionary. This method does not actuall free up all the memory blocks in the dictionary but just marks all the existing items as expired.
This feature was first introduced in the <code>v0.5.0rc17</code> release.
@ -3791,6 +3791,8 @@ See also [[#ngx.shared.DICT.flush_expired|ngx.shared.DICT.flush_expired]] and [[
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.
Unlike the [[#ngx.shared.DICT.flush_all|flush_all]] method, this method actually free up the memory used by the expired items.
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]].