From ece6a68b0436a72d4329b39ebd7befb0f3c8fa1d Mon Sep 17 00:00:00 2001 From: Ville Vesilehto Date: Tue, 17 Mar 2026 20:55:11 +0200 Subject: [PATCH] docs(cache): clarify TTL directive (#7941) --- plugin/cache/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/cache/README.md b/plugin/cache/README.md index d516a91db..209219188 100644 --- a/plugin/cache/README.md +++ b/plugin/cache/README.md @@ -26,6 +26,10 @@ cache [TTL] [ZONES...] * **ZONES** zones it should cache for. If empty, the zones from the configuration block are used. Each element in the cache is cached according to its TTL (with **TTL** as the max). +Note that **TTL** only caps the cache duration and does not extend it. A record with a 30s TTL +will still be cached for 30s even with `cache 600`. The minimum cache duration defaults to 5 +seconds and can be adjusted per cache type using **MINTTL** in the `success` or `denial` directives. + A cache is divided into 256 shards, each holding up to 39 items by default - for a total size of 256 * 39 = 9984 items.