diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-26 00:08:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-26 00:08:58 +0300 |
commit | e0096a0ef1fa770c16c4f7f0ecea618433d7b052 (patch) | |
tree | a1a1823bc6bb5d91bc47b35bd8c6713724043fee /app/models/namespace.rb | |
parent | 28b119a4b47d3a41c4879aab651221b85289bc69 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/namespace.rb')
-rw-r--r-- | app/models/namespace.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 415a655467d..865ca85d982 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -413,12 +413,10 @@ class Namespace < ApplicationRecord return { scope: :group, status: auto_devops_enabled } unless auto_devops_enabled.nil? strong_memoize(:first_auto_devops_config) do - if has_parent? && cache_first_auto_devops_config? + if has_parent? Rails.cache.fetch(first_auto_devops_config_cache_key_for(id), expires_in: 1.day) do parent.first_auto_devops_config end - elsif has_parent? - parent.first_auto_devops_config else { scope: :instance, status: Gitlab::CurrentSettings.auto_devops_enabled? } end @@ -661,8 +659,6 @@ class Namespace < ApplicationRecord end def expire_first_auto_devops_config_cache - return unless cache_first_auto_devops_config? - descendants_to_expire = self_and_descendants.as_ids return if descendants_to_expire.load.empty? @@ -670,10 +666,6 @@ class Namespace < ApplicationRecord Rails.cache.delete_multi(keys) end - def cache_first_auto_devops_config? - ::Feature.enabled?(:namespaces_cache_first_auto_devops_config) - end - def write_projects_repository_config all_projects.find_each do |project| project.set_full_path |