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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-26 17:39:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-26 17:39:41 +0300
commit93fd80667dcfbacca2b41168da6fcb3f67c0899b (patch)
tree17d0bd9c303b7a0dbed87811e438d10fee49991f /lib/gitlab/set_cache.rb
parentf332982c82ad95ae2ee22242c39f78717613165f (diff)
Add latest changes from gitlab-org/security/gitlab@15-3-stable-ee
Diffstat (limited to 'lib/gitlab/set_cache.rb')
-rw-r--r--lib/gitlab/set_cache.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/set_cache.rb b/lib/gitlab/set_cache.rb
index feb2c3c1d7d..896e7e3f65e 100644
--- a/lib/gitlab/set_cache.rb
+++ b/lib/gitlab/set_cache.rb
@@ -68,6 +68,10 @@ module Gitlab
with { |redis| redis.ttl(cache_key(key)) }
end
+ def count(key)
+ with { |redis| redis.scard(cache_key(key)) }
+ end
+
private
def with(&blk)