diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-26 17:39:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-08-26 17:39:41 +0300 |
commit | 93fd80667dcfbacca2b41168da6fcb3f67c0899b (patch) | |
tree | 17d0bd9c303b7a0dbed87811e438d10fee49991f /lib/gitlab/set_cache.rb | |
parent | f332982c82ad95ae2ee22242c39f78717613165f (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.rb | 4 |
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) |