documented the new "get_stale" method for shdict objects.
This commit is contained in:
Родитель
424232deb9
Коммит
87a4f346b8
21
README
21
README
|
@ -3994,6 +3994,8 @@ Nginx API for Lua
|
|||
|
||||
* get
|
||||
|
||||
* get_stale
|
||||
|
||||
* set
|
||||
|
||||
* safe_set
|
||||
|
@ -4092,6 +4094,25 @@ Nginx API for Lua
|
|||
|
||||
See also ngx.shared.DICT.
|
||||
|
||||
ngx.shared.DICT.get_stale
|
||||
syntax: *value, flags, stale = ngx.shared.DICT:get_stale(key)*
|
||||
|
||||
context: *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.**
|
||||
|
||||
Similar to the get method but returns the value even if the key has
|
||||
already expired.
|
||||
|
||||
Returns a 3rd value, "stale", indicating whether the key has expired or
|
||||
not.
|
||||
|
||||
Note that the value of an expired key is not guaranteed to be available
|
||||
so one should never rely on the availability of expired items.
|
||||
|
||||
This method was first introduced in the 0.8.6 release.
|
||||
|
||||
See also ngx.shared.DICT.
|
||||
|
||||
ngx.shared.DICT.set
|
||||
syntax: *success, err, forcible = ngx.shared.DICT:set(key, value,
|
||||
exptime?, flags?)*
|
||||
|
|
|
@ -3696,6 +3696,7 @@ Fetching the shm-based Lua dictionary object for the shared memory zone named `D
|
|||
The resulting object `dict` has the following methods:
|
||||
|
||||
* [get](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.get)
|
||||
* [get_stale](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.get_stale)
|
||||
* [set](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.set)
|
||||
* [safe_set](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.safe_set)
|
||||
* [add](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.add)
|
||||
|
@ -3782,6 +3783,22 @@ This feature was first introduced in the `v0.3.1rc22` release.
|
|||
|
||||
See also [ngx.shared.DICT](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT).
|
||||
|
||||
ngx.shared.DICT.get_stale
|
||||
-------------------------
|
||||
**syntax:** *value, flags, stale = ngx.shared.DICT:get_stale(key)*
|
||||
|
||||
**context:** *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.**
|
||||
|
||||
Similar to the [get](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT.get) method but returns the value even if the key has already expired.
|
||||
|
||||
Returns a 3rd value, `stale`, indicating whether the key has expired or not.
|
||||
|
||||
Note that the value of an expired key is not guaranteed to be available so one should never rely on the availability of expired items.
|
||||
|
||||
This method was first introduced in the `0.8.6` release.
|
||||
|
||||
See also [ngx.shared.DICT](http://wiki.nginx.org/HttpLuaModule#ngx.shared.DICT).
|
||||
|
||||
ngx.shared.DICT.set
|
||||
-------------------
|
||||
**syntax:** *success, err, forcible = ngx.shared.DICT:set(key, value, exptime?, flags?)*
|
||||
|
|
|
@ -3573,6 +3573,7 @@ Fetching the shm-based Lua dictionary object for the shared memory zone named <c
|
|||
The resulting object <code>dict</code> has the following methods:
|
||||
|
||||
* [[#ngx.shared.DICT.get|get]]
|
||||
* [[#ngx.shared.DICT.get_stale|get_stale]]
|
||||
* [[#ngx.shared.DICT.set|set]]
|
||||
* [[#ngx.shared.DICT.safe_set|safe_set]]
|
||||
* [[#ngx.shared.DICT.add|add]]
|
||||
|
@ -3658,6 +3659,21 @@ This feature was first introduced in the <code>v0.3.1rc22</code> release.
|
|||
|
||||
See also [[#ngx.shared.DICT|ngx.shared.DICT]].
|
||||
|
||||
== ngx.shared.DICT.get_stale ==
|
||||
'''syntax:''' ''value, flags, stale = ngx.shared.DICT:get_stale(key)''
|
||||
|
||||
'''context:''' ''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.*''
|
||||
|
||||
Similar to the [[#ngx.shared.DICT.get|get]] method but returns the value even if the key has already expired.
|
||||
|
||||
Returns a 3rd value, <code>stale</code>, indicating whether the key has expired or not.
|
||||
|
||||
Note that the value of an expired key is not guaranteed to be available so one should never rely on the availability of expired items.
|
||||
|
||||
This method was first introduced in the <code>0.8.6</code> release.
|
||||
|
||||
See also [[#ngx.shared.DICT|ngx.shared.DICT]].
|
||||
|
||||
== ngx.shared.DICT.set ==
|
||||
'''syntax:''' ''success, err, forcible = ngx.shared.DICT:set(key, value, exptime?, flags?)''
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче