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:
authorDouwe Maan <douwe@gitlab.com>2016-02-20 22:54:16 +0300
committerRémy Coutable <remy@rymai.me>2016-02-21 23:06:44 +0300
commit20b3be6e24c1ce160fab6595958ea3f40efdec20 (patch)
tree797f32183c362861d3251270bd537893cacf0047 /app
parent3d83a06356735e3e3e71e35be46bf0d8a2eeda49 (diff)
Merge branch 'flush-cache-web-editor' into 'master'
Flush emptiness caches whenever needed See merge request !2903
Diffstat (limited to 'app')
-rw-r--r--app/models/repository.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index be30a3b0906..e050bd45254 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -239,6 +239,10 @@ class Repository
end
expire_branch_cache(branch_name)
+
+ # This ensures this particular cache is flushed after the first commit to a
+ # new repository.
+ expire_emptiness_caches if empty?
end
# Expires _all_ caches, including those that would normally only be expired