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:
parent
6cf14746ad
commit
b44d82839f
5 changed files with 21 additions and 16 deletions
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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue