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:
authorStan Hu <stanhu@gmail.com>2016-07-24 20:39:28 +0300
committerStan Hu <stanhu@gmail.com>2016-07-25 15:09:28 +0300
commit3618796e15d542293aaa721045ff943d360d963a (patch)
treea9f0f4eaf7c3671b1158f975973765cc38d60563 /app/models
parent83180110348af1b244d56e9cdf5f29c5d6f84db0 (diff)
Use project ID in repository cache to prevent stale data from persisting across projects
We have a number of bugs caused by cache keys not being flushed properly during deletion of a project. Add the project ID to ensure this never happens. Closes #20027
Diffstat (limited to 'app/models')
-rw-r--r--app/models/repository.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 793b1cf4989..053e2a9555b 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -1031,7 +1031,7 @@ class Repository
private
def cache
- @cache ||= RepositoryCache.new(path_with_namespace)
+ @cache ||= RepositoryCache.new(path_with_namespace, @project.id)
end
def head_exists?