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
path: root/app
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-08-29 21:46:31 +0300
committerStan Hu <stanhu@gmail.com>2019-08-29 21:46:31 +0300
commit3ee7d74694824d4b0649f9579dfa3927a9772e51 (patch)
tree1ec6e933591e8f9132f4b86abc31ffc51ccd5a47 /app
parentce7cbdcbe5f4c202e1c545ba2f083c01f197949e (diff)
parentc6ccc07f48c7c1f9da43ecd82015500a4340544d (diff)
Merge branch 'revert-64251-branch-cache' into 'master'
Revert "Cache branch and tag names as Redis sets" See merge request gitlab-org/gitlab-ce!32408
Diffstat (limited to 'app')
-rw-r--r--app/models/repository.rb12
1 files changed, 4 insertions, 8 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index b957b9b0bdd..6f63cd32da4 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -239,13 +239,13 @@ class Repository
def branch_exists?(branch_name)
return false unless raw_repository
- branch_names_include?(branch_name)
+ branch_names.include?(branch_name)
end
def tag_exists?(tag_name)
return false unless raw_repository
- tag_names_include?(tag_name)
+ tag_names.include?(tag_name)
end
def ref_exists?(ref)
@@ -565,10 +565,10 @@ class Repository
end
delegate :branch_names, to: :raw_repository
- cache_method_as_redis_set :branch_names, fallback: []
+ cache_method :branch_names, fallback: []
delegate :tag_names, to: :raw_repository
- cache_method_as_redis_set :tag_names, fallback: []
+ cache_method :tag_names, fallback: []
delegate :branch_count, :tag_count, :has_visible_content?, to: :raw_repository
cache_method :branch_count, fallback: 0
@@ -1130,10 +1130,6 @@ class Repository
@cache ||= Gitlab::RepositoryCache.new(self)
end
- def redis_set_cache
- @redis_set_cache ||= Gitlab::RepositorySetCache.new(self)
- end
-
def request_store_cache
@request_store_cache ||= Gitlab::RepositoryCache.new(self, backend: Gitlab::SafeRequestStore)
end