Skip to content

Commit

Permalink
docs: add ttl option for keyval
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagoc01 authored and kjdev committed Mar 31, 2024
1 parent 26f967e commit d3f7992
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,17 @@ 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
```

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: -
Expand Down Expand Up @@ -145,14 +148,16 @@ 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
```

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: -
Expand Down Expand Up @@ -187,4 +192,4 @@ Example
TODO
----

- [ ] Support for `[state=file]`, `[timeout=time]` in `keyval_zone` directive
- [ ] Support for `[state=file]` in `keyval_zone` directive

0 comments on commit d3f7992

Please sign in to comment.