aboutsummaryrefslogtreecommitdiff
path: root/plugin/cache
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/cache')
-rw-r--r--plugin/cache/handler.go3
-rw-r--r--plugin/cache/setup.go8
2 files changed, 3 insertions, 8 deletions
diff --git a/plugin/cache/handler.go b/plugin/cache/handler.go
index a44a4ec3b..2d608e8d3 100644
--- a/plugin/cache/handler.go
+++ b/plugin/cache/handler.go
@@ -3,7 +3,6 @@ package cache
import (
"context"
"math"
- "sync"
"time"
"github.com/coredns/coredns/plugin"
@@ -126,5 +125,3 @@ var (
Help: "The number responses that are not cached, because the reply is malformed.",
}, []string{"server"})
)
-
-var once sync.Once
diff --git a/plugin/cache/setup.go b/plugin/cache/setup.go
index 8464c27d9..d6052b162 100644
--- a/plugin/cache/setup.go
+++ b/plugin/cache/setup.go
@@ -34,11 +34,9 @@ func setup(c *caddy.Controller) error {
})
c.OnStartup(func() error {
- once.Do(func() {
- metrics.MustRegister(c,
- cacheSize, cacheHits, cacheMisses,
- cachePrefetches, cacheDrops)
- })
+ metrics.MustRegister(c,
+ cacheSize, cacheHits, cacheMisses,
+ cachePrefetches, cacheDrops)
return nil
})