diff options
author | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-09-29 14:36:07 +0300 |
---|---|---|
committer | feistel <6742251-feistel@users.noreply.gitlab.com> | 2021-10-29 23:51:57 +0300 |
commit | a883bfe7fd1fd4f818128fd6cd80ea1572d5fa2e (patch) | |
tree | 25151e148385fe787c81d8c4ae78905a18177985 /internal | |
parent | f8fc5488ab8de110cb981e2b1e0481160ddf0dbb (diff) |
refactor: revert DomainsSourceCacheMiss changes
Diffstat (limited to 'internal')
-rw-r--r-- | internal/source/gitlab/cache/cache.go | 4 |
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) } |