diff options
author | 2023-01-27 17:35:24 +0100 | |
---|---|---|
committer | 2023-01-27 11:35:24 -0500 | |
commit | bf7c2cf37bf35ba3a7596cb32c5a3607d896f95d (patch) | |
tree | 83a2dc9ae6ec2bd04074f42dd0d5f1962f916f68 /plugin/cache/setup.go | |
parent | d3e4fc78c3b80c1768b0f95ad849b07ba9968ba5 (diff) | |
download | coredns-bf7c2cf37bf35ba3a7596cb32c5a3607d896f95d.tar.gz coredns-bf7c2cf37bf35ba3a7596cb32c5a3607d896f95d.tar.zst coredns-bf7c2cf37bf35ba3a7596cb32c5a3607d896f95d.zip |
plugin/cache: add a new keepttl option (#5879)
adds a new option `keepttl` to the cache plugin
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
Diffstat (limited to 'plugin/cache/setup.go')
-rw-r--r-- | plugin/cache/setup.go | 5 |
1 files changed, 5 insertions, 0 deletions
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() } |