mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
middleware/cache: rename categories (#321)
Rename: positive -> success negative -> denial There is a third (unused category) which is error. Start using these new in the caching middleware and later in the logging middleware.
This commit is contained in:
4
middleware/cache/setup.go
vendored
4
middleware/cache/setup.go
vendored
@@ -58,7 +58,7 @@ func cacheParse(c *caddy.Controller) (*Cache, error) {
|
||||
for c.NextBlock() {
|
||||
switch c.Val() {
|
||||
// first number is cap, second is an new ttl
|
||||
case "positive":
|
||||
case "success":
|
||||
args := c.RemainingArgs()
|
||||
if len(args) == 0 {
|
||||
return nil, c.ArgErr()
|
||||
@@ -75,7 +75,7 @@ func cacheParse(c *caddy.Controller) (*Cache, error) {
|
||||
}
|
||||
ca.pttl = time.Duration(pttl) * time.Second
|
||||
}
|
||||
case "negative":
|
||||
case "denial":
|
||||
args := c.RemainingArgs()
|
||||
if len(args) == 0 {
|
||||
return nil, c.ArgErr()
|
||||
|
||||
Reference in New Issue
Block a user