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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-08-15 12:11:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-08-15 12:11:06 +0300
commit5f431529c8eb0fd5c84df1e66a38ee88b8da1ba6 (patch)
treeae43e505bc222b2ea53ee7bfe7f81748ba944038 /app/models/repository.rb
parentdefacc074a4a576e15021ba264de745af982b45d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r--app/models/repository.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb
index 234a3a83320..eb8e45877f3 100644
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -337,11 +337,17 @@ class Repository
def expire_branches_cache
expire_method_caches(%i(branch_names merged_branch_names branch_count has_visible_content? has_ambiguous_refs?))
+ expire_protected_branches_cache
+
@local_branches = nil
@branch_exists_memo = nil
@branch_names_include = nil
end
+ def expire_protected_branches_cache
+ ProtectedBranches::CacheService.new(project).refresh if project # rubocop:disable CodeReuse/ServiceClass
+ end
+
def expire_statistics_caches
expire_method_caches(%i(size commit_count))
end