diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-05 12:12:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-05 12:12:22 +0300 |
commit | a7ad6496140ba3272b2d88d8e79e7e4d699f5653 (patch) | |
tree | 7a6160629434cd1322c90739b55014f01c638577 /lib/gitlab/cache | |
parent | 6d706d5dc036fb40f4d7b8e6619c3c78335620aa (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/cache')
-rw-r--r-- | lib/gitlab/cache/helpers.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gitlab/cache/helpers.rb b/lib/gitlab/cache/helpers.rb index dc410ec4f34..48b6ca59367 100644 --- a/lib/gitlab/cache/helpers.rb +++ b/lib/gitlab/cache/helpers.rb @@ -81,7 +81,6 @@ module Gitlab # @param expires_in [ActiveSupport::Duration, Integer] an expiry time for the cache entry # @return [Array<String>] def cached_collection(collection, presenter:, presenter_args:, context:, expires_in:) - total_count = collection.size misses = 0 json = fetch_multi(presenter, collection, context: context, expires_in: expires_in) do |obj| @@ -92,7 +91,7 @@ module Gitlab end end - increment_cache_metric(render_type: :collection, total_count: total_count, miss_count: misses) + increment_cache_metric(render_type: :collection, total_count: collection.length, miss_count: misses) json.values end |