-
由 Jon Glassman 创作于由 Jon Glassman 创作于
代码所有者
将用户和群组指定为特定文件更改的核准人。 了解更多。
application_settings_cache.md 1.35 KiB
stage: Data Stores
group: Cloud Connector
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
Application cache interval (FREE SELF)
By default, GitLab caches application settings for 60 seconds. Occasionally, you may need to increase that interval to have more delay between application setting changes and when users notice those changes in the application.
We recommend you set this value to greater than 0
seconds. Setting it to 0
causes the application_settings
table to load for every request. This causes
extra load for Redis and PostgreSQL.
Change the expiration interval for application cache
To change the expiry value:
::Tabs
:::TabTitle Linux package (Omnibus)
-
Edit
/etc/gitlab/gitlab.rb
:gitlab_rails['application_settings_cache_seconds'] = 60
-
Save the file, and then reconfigure and restart GitLab for the changes to take effect:
gitlab-ctl reconfigure gitlab-ctl restart
:::TabTitle Self-compiled (Source)
-
Edit
config/gitlab.yml
:gitlab: application_settings_cache_seconds: 60
-
Save the file, and then restart GitLab for the changes to take effect.
::EndTabs