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/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-01-08 22:37:54 +0300
committerStan Hu <stanhu@gmail.com>2019-01-09 00:14:06 +0300
commite884795e6c449b2757de72035b919dbce6e76211 (patch)
tree1e73514de28c8a1b32f262e90b9739321b7e95a7 /lib
parent1b3affafab0f28c690ce93cc98ac6bd09cbda59f (diff)
Revert "Merge branch '3062-improve-project-cache' into 'master'"
This reverts commit e65e184269bb27661c9a20658933e8482aa90b62, reversing changes made to 646ba2418b630710edeaac94b57d08adf2771257.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/repository_cache.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/repository_cache.rb b/lib/gitlab/repository_cache.rb
index 6b0808f5304..56007574b1b 100644
--- a/lib/gitlab/repository_cache.rb
+++ b/lib/gitlab/repository_cache.rb
@@ -7,13 +7,13 @@ module Gitlab
def initialize(repository, extra_namespace: nil, backend: Rails.cache)
@repository = repository
- @namespace = "project:#{repository.project.id}"
+ @namespace = "#{repository.full_path}:#{repository.project.id}"
@namespace = "#{@namespace}:#{extra_namespace}" if extra_namespace
@backend = backend
end
def cache_key(type)
- "#{namespace}:#{type}"
+ "#{type}:#{namespace}"
end
def expire(key)