From bf7c2cf37bf35ba3a7596cb32c5a3607d896f95d Mon Sep 17 00:00:00 2001 From: Arthur Outhenin-Chalandre Date: Fri, 27 Jan 2023 17:35:24 +0100 Subject: plugin/cache: add a new keepttl option (#5879) adds a new option `keepttl` to the cache plugin Signed-off-by: Arthur Outhenin-Chalandre --- plugin/cache/setup.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugin/cache/setup.go') diff --git a/plugin/cache/setup.go b/plugin/cache/setup.go index 6a537d986..7e5dfa174 100644 --- a/plugin/cache/setup.go +++ b/plugin/cache/setup.go @@ -240,6 +240,11 @@ func cacheParse(c *caddy.Controller) (*Cache, error) { default: return nil, fmt.Errorf("cache type for disable must be %q or %q", Success, Denial) } + case "keepttl": + if len(args) != 0 { + return nil, c.ArgErr() + } + ca.keepttl = true default: return nil, c.ArgErr() } -- cgit v1.2.3