From d3f7992b453439148aef023b71fcf1101458a203 Mon Sep 17 00:00:00 2001 From: Thiago Castro Date: Tue, 12 Mar 2024 23:30:42 -0300 Subject: [PATCH] docs: add ttl option for keyval --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7e403e4..8019e99 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ The database is stored in shared memory or Redis as specified by the zone parameter. ``` -Syntax: keyval_zone zone=name:size; +Syntax: keyval_zone zone=name:size [timeout=time] [ttl=time]; Default: - Context: http ``` @@ -86,6 +86,9 @@ Context: http Sets the `name` and `size` of the shared memory zone that keeps the key-value database. +The optional `timeout` or `ttl` parameter sets the time to live +which key-value pairs are removed (default value is `0` seconds). + ``` Syntax: keyval_zone_redis zone=name [hostname=name] [port=number] [database=number] [connect_timeout=time] [ttl=time]; Default: - @@ -145,7 +148,7 @@ The database is stored in shared memory or Redis as specified by the zone parameter. ``` -Syntax: keyval_zone zone=name:size; +Syntax: keyval_zone zone=name:size [timeout=time] [ttl=time]; Default: - Context: http ``` @@ -153,6 +156,8 @@ Context: http Sets the `name` and `size` of the shared memory zone that keeps the key-value database. +The optional `timeout` or `ttl` parameter sets the time to live which key-value pairs are removed (default value is 0 seconds). + ``` Syntax: keyval_zone_redis zone=name [hostname=name] [port=number] [database=number] [connect_timeout=time] [ttl=time]; Default: - @@ -187,4 +192,4 @@ Example TODO ---- -- [ ] Support for `[state=file]`, `[timeout=time]` in `keyval_zone` directive +- [ ] Support for `[state=file]` in `keyval_zone` directive