# HG changeset patch # User Yaroslav Zhuravlev # Date 1694550771 -3600 # Node ID 2e8c1384d211b052582d367e2d3fb53ba3dcf3ea # Parent 4470b2bff7b77987ade4a4eaa0d4c01f210c18df Documented ngx.shared.SharedDict.items in njs Reference. diff -r 4470b2bff7b7 -r 2e8c1384d211 xml/en/docs/njs/compatibility.xml --- a/xml/en/docs/njs/compatibility.xml Tue Sep 12 21:32:42 2023 +0100 +++ b/xml/en/docs/njs/compatibility.xml Tue Sep 12 21:32:51 2023 +0100 @@ -9,7 +9,7 @@
@@ -1122,10 +1122,11 @@ add, clear, delete, -incr, freeSpace, get, has, +incr, +items, keys, pop, replace, diff -r 4470b2bff7b7 -r 2e8c1384d211 xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/reference.xml Tue Sep 12 21:32:42 2023 +0100 +++ b/xml/en/docs/njs/reference.xml Tue Sep 12 21:32:51 2023 +0100 @@ -9,7 +9,7 @@
+ rev="116">
@@ -1599,10 +1599,11 @@ ngx.shared.SharedDict.capacity ngx.shared.SharedDict.clear() ngx.shared.SharedDict.delete() -ngx.shared.SharedDict.incr() ngx.shared.SharedDict.freeSpace() ngx.shared.SharedDict.get() ngx.shared.SharedDict.has() +ngx.shared.SharedDict.incr() +ngx.shared.SharedDict.items() ngx.shared.SharedDict.keys() ngx.shared.SharedDict.name ngx.shared.SharedDict.pop() @@ -1669,6 +1670,27 @@ false otherwise. +ngx.shared.SharedDict.freeSpace() + +Returns the free page size in bytes. +If the size is zero, the SharedDict dictionary +will still accept new values if there is space in the occupied pages. + + +ngx.shared.SharedDict.get(key) + +Retrieves the item by its key, +returns the value associated with the key +or undefined if there is none. + + +ngx.shared.SharedDict.has(key) + +Searches for an item by its key, +returns true if such item exists or +false otherwise. + + ngx.shared.SharedDict.incr(key,delta[,init]) Increments the integer value associated with the key @@ -1694,25 +1716,14 @@ -ngx.shared.SharedDict.freeSpace() - -Returns the free page size in bytes. -If the size is zero, the SharedDict dictionary -will still accept new values if there is space in the occupied pages. - - -ngx.shared.SharedDict.get(key) - -Retrieves the item by its key, -returns the value associated with the key -or undefined if there is none. - - -ngx.shared.SharedDict.has(key) - -Searches for an item by its key, -returns true if such item exists or -false otherwise. +ngx.shared.SharedDict.items([maxCount]) + +Returns an array of the SharedDict dictionary +key-value items (since 0.8.1). +The maxCount parameter +sets maximum number of items to retrieve, +by default is 1024. + ngx.shared.SharedDict.keys([maxCount]) @@ -1721,7 +1732,6 @@ The maxCount parameter sets maximum number of keys to retrieve, by default is 1024. - ngx.shared.SharedDict.name diff -r 4470b2bff7b7 -r 2e8c1384d211 xml/ru/docs/njs/compatibility.xml --- a/xml/ru/docs/njs/compatibility.xml Tue Sep 12 21:32:42 2023 +0100 +++ b/xml/ru/docs/njs/compatibility.xml Tue Sep 12 21:32:51 2023 +0100 @@ -9,7 +9,7 @@
@@ -1122,10 +1122,11 @@ add, clear, delete, -incr, freeSpace, get, has, +incr, +items, keys, pop, replace,