Skip to content

Commit

Permalink
update reference.json (#13)
Browse files Browse the repository at this point in the history
Co-authored-by: ryepup <ryepup@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and ryepup authored Sep 6, 2023
1 parent c1a6764 commit 34c1d0f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions reference-lib/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion reference-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nginxinc/reference-lib",
"version": "1.0.2",
"version": "1.0.3",
"description": "",
"main": "dist/index.js",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions reference-lib/src/reference.json
Original file line number Diff line number Diff line change
Expand Up @@ -4649,8 +4649,8 @@
"<p><code>zone</code>=<em><code>name</code></em>:<em><code>size</code></em> [<code>timeout</code>=<em><code>time</code></em>] [<code>type</code>=<code>string</code>|<code>number</code>] [<code>evict</code>]</p>\n"
],
"isBlock": false,
"description_md": "Sets the *`name`* and *`size`* of the shared memory zone\nthat keeps the key-value dictionary\nshared between worker processes.\n\nBy default the shared dictionary uses a string as a key and a value.\nThe optional `type` parameter\nallows redefining the value type to number.\n\nThe optional `timeout` parameter sets\nthe time after which all shared dictionary entries are removed from the zone.\n\nThe optional `evict` parameter removes the oldest\nkey-value pair when the zone storage is exhausted.\n\nExamples:\n```\nexample.conf:\n # Creates a 1Mb dictionary with string values,\n # removes key-value pairs after 60 seconds of inactivity:\n js_shared_dict_zone zone=foo:1M timeout=60s;\n\n # Creates a 512Kb dictionary with string values,\n # forcibly removes oldest key-value pairs when the zone is exhausted:\n js_shared_dict_zone zone=bar:512K timeout=30s evict;\n\n # Creates a 32Kb permanent dictionary with number values:\n js_shared_dict_zone zone=num:32k type=number;\n\nexample.js:\n function get(r) {\n r.return(200, ngx.shared.foo.get(r.args.key));\n }\n\n function set(r) {\n r.return(200, ngx.shared.foo.set(r.args.key, r.args.value));\n }\n\n function del(r) {\n r.return(200, ngx.shared.bar.delete(r.args.key));\n }\n\n function increment(r) {\n r.return(200, ngx.shared.num.incr(r.args.key, 2));\n }\n```",
"description_html": "<p>Sets the <em><code>name</code></em> and <em><code>size</code></em> of the shared memory zone\nthat keeps the key-value dictionary\nshared between worker processes.</p>\n\n<p>By default the shared dictionary uses a string as a key and a value.\nThe optional <code>type</code> parameter\nallows redefining the value type to number.</p>\n\n<p>The optional <code>timeout</code> parameter sets\nthe time after which all shared dictionary entries are removed from the zone.</p>\n\n<p>The optional <code>evict</code> parameter removes the oldest\nkey-value pair when the zone storage is exhausted.</p>\n\n<p>Examples:</p>\n\n<pre><code>example.conf:\n # Creates a 1Mb dictionary with string values,\n # removes key-value pairs after 60 seconds of inactivity:\n js_shared_dict_zone zone=foo:1M timeout=60s;\n\n # Creates a 512Kb dictionary with string values,\n # forcibly removes oldest key-value pairs when the zone is exhausted:\n js_shared_dict_zone zone=bar:512K timeout=30s evict;\n\n # Creates a 32Kb permanent dictionary with number values:\n js_shared_dict_zone zone=num:32k type=number;\n\nexample.js:\n function get(r) {\n r.return(200, ngx.shared.foo.get(r.args.key));\n }\n\n function set(r) {\n r.return(200, ngx.shared.foo.set(r.args.key, r.args.value));\n }\n\n function del(r) {\n r.return(200, ngx.shared.bar.delete(r.args.key));\n }\n\n function increment(r) {\n r.return(200, ngx.shared.num.incr(r.args.key, 2));\n }\n</code></pre>\n"
"description_md": "Sets the *`name`* and *`size`* of the shared memory zone\nthat keeps the\nkey-value [dictionary](https://nginx.org/en/docs/njs/reference.html#dict)\nshared between worker processes.\n\nBy default the shared dictionary uses a string as a key and a value.\nThe optional `type` parameter\nallows redefining the value type to number.\n\nThe optional `timeout` parameter sets\nthe time after which all shared dictionary entries are removed from the zone.\n\nThe optional `evict` parameter removes the oldest\nkey-value pair when the zone storage is exhausted.\n\nExamples:\n```\nexample.conf:\n # Creates a 1Mb dictionary with string values,\n # removes key-value pairs after 60 seconds of inactivity:\n js_shared_dict_zone zone=foo:1M timeout=60s;\n\n # Creates a 512Kb dictionary with string values,\n # forcibly removes oldest key-value pairs when the zone is exhausted:\n js_shared_dict_zone zone=bar:512K timeout=30s evict;\n\n # Creates a 32Kb permanent dictionary with number values:\n js_shared_dict_zone zone=num:32k type=number;\n\nexample.js:\n function get(r) {\n r.return(200, ngx.shared.foo.get(r.args.key));\n }\n\n function set(r) {\n r.return(200, ngx.shared.foo.set(r.args.key, r.args.value));\n }\n\n function del(r) {\n r.return(200, ngx.shared.bar.delete(r.args.key));\n }\n\n function increment(r) {\n r.return(200, ngx.shared.num.incr(r.args.key, 2));\n }\n```",
"description_html": "<p>Sets the <em><code>name</code></em> and <em><code>size</code></em> of the shared memory zone\nthat keeps the\nkey-value <a href=\"https://nginx.org/en/docs/njs/reference.html#dict\" target=\"_blank\">dictionary</a>\nshared between worker processes.</p>\n\n<p>By default the shared dictionary uses a string as a key and a value.\nThe optional <code>type</code> parameter\nallows redefining the value type to number.</p>\n\n<p>The optional <code>timeout</code> parameter sets\nthe time after which all shared dictionary entries are removed from the zone.</p>\n\n<p>The optional <code>evict</code> parameter removes the oldest\nkey-value pair when the zone storage is exhausted.</p>\n\n<p>Examples:</p>\n\n<pre><code>example.conf:\n # Creates a 1Mb dictionary with string values,\n # removes key-value pairs after 60 seconds of inactivity:\n js_shared_dict_zone zone=foo:1M timeout=60s;\n\n # Creates a 512Kb dictionary with string values,\n # forcibly removes oldest key-value pairs when the zone is exhausted:\n js_shared_dict_zone zone=bar:512K timeout=30s evict;\n\n # Creates a 32Kb permanent dictionary with number values:\n js_shared_dict_zone zone=num:32k type=number;\n\nexample.js:\n function get(r) {\n r.return(200, ngx.shared.foo.get(r.args.key));\n }\n\n function set(r) {\n r.return(200, ngx.shared.foo.set(r.args.key, r.args.value));\n }\n\n function del(r) {\n r.return(200, ngx.shared.bar.delete(r.args.key));\n }\n\n function increment(r) {\n r.return(200, ngx.shared.num.incr(r.args.key, 2));\n }\n</code></pre>\n"
},
{
"name": "js_var",
Expand Down Expand Up @@ -12940,8 +12940,8 @@
"<p><code>zone</code>=<em><code>name</code></em>:<em><code>size</code></em> [<code>timeout</code>=<em><code>time</code></em>] [<code>type</code>=<code>string</code>|<code>number</code>] [<code>evict</code>]</p>\n"
],
"isBlock": false,
"description_md": "Sets the *`name`* and *`size`* of the shared memory zone\nthat keeps the key-value dictionary\nshared between worker processes.\n\nBy default the shared dictionary uses a string as a key and a value.\nThe optional `type` parameter\nallows redefining the value type to number.\n\nThe optional `timeout` parameter sets\nthe time after which all shared dictionary entries are removed from the zone.\n\nThe optional `evict` parameter removes the oldest\nkey-value pair when the zone storage is exhausted.\n\nExamples:\n```\nexample.conf:\n # Creates a 1Mb dictionary with string values,\n # removes key-value pairs after 60 seconds of inactivity:\n js_shared_dict_zone zone=foo:1M timeout=60s;\n\n # Creates a 512Kb dictionary with string values,\n # forcibly removes oldest key-value pairs when the zone is exhausted:\n js_shared_dict_zone zone=bar:512K timeout=30s evict;\n\n # Creates a 32Kb permanent dictionary with number values:\n js_shared_dict_zone zone=num:32k type=number;\n\nexample.js:\n function get(r) {\n r.return(200, ngx.shared.foo.get(r.args.key));\n }\n\n function set(r) {\n r.return(200, ngx.shared.foo.set(r.args.key, r.args.value));\n }\n\n function del(r) {\n r.return(200, ngx.shared.bar.delete(r.args.key));\n }\n\n function increment(r) {\n r.return(200, ngx.shared.num.incr(r.args.key, 2));\n }\n```",
"description_html": "<p>Sets the <em><code>name</code></em> and <em><code>size</code></em> of the shared memory zone\nthat keeps the key-value dictionary\nshared between worker processes.</p>\n\n<p>By default the shared dictionary uses a string as a key and a value.\nThe optional <code>type</code> parameter\nallows redefining the value type to number.</p>\n\n<p>The optional <code>timeout</code> parameter sets\nthe time after which all shared dictionary entries are removed from the zone.</p>\n\n<p>The optional <code>evict</code> parameter removes the oldest\nkey-value pair when the zone storage is exhausted.</p>\n\n<p>Examples:</p>\n\n<pre><code>example.conf:\n # Creates a 1Mb dictionary with string values,\n # removes key-value pairs after 60 seconds of inactivity:\n js_shared_dict_zone zone=foo:1M timeout=60s;\n\n # Creates a 512Kb dictionary with string values,\n # forcibly removes oldest key-value pairs when the zone is exhausted:\n js_shared_dict_zone zone=bar:512K timeout=30s evict;\n\n # Creates a 32Kb permanent dictionary with number values:\n js_shared_dict_zone zone=num:32k type=number;\n\nexample.js:\n function get(r) {\n r.return(200, ngx.shared.foo.get(r.args.key));\n }\n\n function set(r) {\n r.return(200, ngx.shared.foo.set(r.args.key, r.args.value));\n }\n\n function del(r) {\n r.return(200, ngx.shared.bar.delete(r.args.key));\n }\n\n function increment(r) {\n r.return(200, ngx.shared.num.incr(r.args.key, 2));\n }\n</code></pre>\n"
"description_md": "Sets the *`name`* and *`size`* of the shared memory zone\nthat keeps the\nkey-value [dictionary](https://nginx.org/en/docs/njs/reference.html#dict)\nshared between worker processes.\n\nBy default the shared dictionary uses a string as a key and a value.\nThe optional `type` parameter\nallows redefining the value type to number.\n\nThe optional `timeout` parameter sets\nthe time after which all shared dictionary entries are removed from the zone.\n\nThe optional `evict` parameter removes the oldest\nkey-value pair when the zone storage is exhausted.\n\nExamples:\n```\nexample.conf:\n # Creates a 1Mb dictionary with string values,\n # removes key-value pairs after 60 seconds of inactivity:\n js_shared_dict_zone zone=foo:1M timeout=60s;\n\n # Creates a 512Kb dictionary with string values,\n # forcibly removes oldest key-value pairs when the zone is exhausted:\n js_shared_dict_zone zone=bar:512K timeout=30s evict;\n\n # Creates a 32Kb permanent dictionary with number values:\n js_shared_dict_zone zone=num:32k type=number;\n\nexample.js:\n function get(r) {\n r.return(200, ngx.shared.foo.get(r.args.key));\n }\n\n function set(r) {\n r.return(200, ngx.shared.foo.set(r.args.key, r.args.value));\n }\n\n function del(r) {\n r.return(200, ngx.shared.bar.delete(r.args.key));\n }\n\n function increment(r) {\n r.return(200, ngx.shared.num.incr(r.args.key, 2));\n }\n```",
"description_html": "<p>Sets the <em><code>name</code></em> and <em><code>size</code></em> of the shared memory zone\nthat keeps the\nkey-value <a href=\"https://nginx.org/en/docs/njs/reference.html#dict\" target=\"_blank\">dictionary</a>\nshared between worker processes.</p>\n\n<p>By default the shared dictionary uses a string as a key and a value.\nThe optional <code>type</code> parameter\nallows redefining the value type to number.</p>\n\n<p>The optional <code>timeout</code> parameter sets\nthe time after which all shared dictionary entries are removed from the zone.</p>\n\n<p>The optional <code>evict</code> parameter removes the oldest\nkey-value pair when the zone storage is exhausted.</p>\n\n<p>Examples:</p>\n\n<pre><code>example.conf:\n # Creates a 1Mb dictionary with string values,\n # removes key-value pairs after 60 seconds of inactivity:\n js_shared_dict_zone zone=foo:1M timeout=60s;\n\n # Creates a 512Kb dictionary with string values,\n # forcibly removes oldest key-value pairs when the zone is exhausted:\n js_shared_dict_zone zone=bar:512K timeout=30s evict;\n\n # Creates a 32Kb permanent dictionary with number values:\n js_shared_dict_zone zone=num:32k type=number;\n\nexample.js:\n function get(r) {\n r.return(200, ngx.shared.foo.get(r.args.key));\n }\n\n function set(r) {\n r.return(200, ngx.shared.foo.set(r.args.key, r.args.value));\n }\n\n function del(r) {\n r.return(200, ngx.shared.bar.delete(r.args.key));\n }\n\n function increment(r) {\n r.return(200, ngx.shared.num.incr(r.args.key, 2));\n }\n</code></pre>\n"
},
{
"name": "js_var",
Expand Down Expand Up @@ -14838,5 +14838,5 @@
]
}
],
"version": "http://hg.nginx.org/nginx.org/rev/0e805229dd19"
"version": "http://hg.nginx.org/nginx.org/rev/3184864bbb3f"
}

0 comments on commit 34c1d0f

Please sign in to comment.