Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-09-29 14:36:07 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-10-29 23:51:57 +0300
commita883bfe7fd1fd4f818128fd6cd80ea1572d5fa2e (patch)
tree25151e148385fe787c81d8c4ae78905a18177985
parentf8fc5488ab8de110cb981e2b1e0481160ddf0dbb (diff)
refactor: revert DomainsSourceCacheMiss changes
-rw-r--r--internal/source/gitlab/cache/cache.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/source/gitlab/cache/cache.go b/internal/source/gitlab/cache/cache.go
index c5340af9..d569b81b 100644
--- a/internal/source/gitlab/cache/cache.go
+++ b/internal/source/gitlab/cache/cache.go
@@ -83,12 +83,14 @@ func (c *Cache) Resolve(ctx context.Context, domain string) *api.Lookup {
return entry.Lookup()
}
- metrics.DomainsSourceCacheMiss.Inc()
if entry.NeedsRefresh() {
c.Refresh(entry)
+
+ metrics.DomainsSourceCacheHit.Inc()
return entry.Lookup()
}
+ metrics.DomainsSourceCacheMiss.Inc()
return c.retrieve(ctx, entry)
}