mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
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>
This commit is contained in:
committed by
GitHub
parent
d3e4fc78c3
commit
bf7c2cf37b
5
plugin/cache/setup.go
vendored
5
plugin/cache/setup.go
vendored
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user