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:
Miek Gieben 2016-10-08 15:12:28 +01:00 committed by GitHub
parent 6cf14746ad
commit b44d82839f
5 changed files with 21 additions and 16 deletions

View file

@ -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()