debian-mirror-gitlab/doc/administration/application_settings_cache.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.4 KiB
Markdown
Raw Normal View History

2021-03-11 19:13:27 +05:30
---
2022-07-23 23:45:48 +05:30
stage: Data Stores
2022-08-27 11:52:29 +05:30
group: Application Performance
2022-11-25 23:54:43 +05:30
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
2021-03-11 19:13:27 +05:30
---
2022-07-23 23:45:48 +05:30
# Application cache interval **(FREE SELF)**
2021-03-11 19:13:27 +05:30
2021-06-08 01:23:25 +05:30
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.
2021-03-11 19:13:27 +05:30
2021-06-08 01:23:25 +05:30
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.
2021-03-11 19:13:27 +05:30
2022-07-23 23:45:48 +05:30
## Change the expiration interval for application cache
2021-03-11 19:13:27 +05:30
To change the expiry value:
2022-10-11 01:57:18 +05:30
::Tabs
2023-03-04 22:38:38 +05:30
:::TabTitle Linux package (Omnibus)
2021-03-11 19:13:27 +05:30
1. Edit `/etc/gitlab/gitlab.rb`:
```ruby
gitlab_rails['application_settings_cache_seconds'] = 60
```
2021-06-08 01:23:25 +05:30
1. Save the file, and then reconfigure and restart GitLab for the changes to
take effect:
2021-03-11 19:13:27 +05:30
```shell
gitlab-ctl reconfigure
gitlab-ctl restart
```
2023-03-04 22:38:38 +05:30
:::TabTitle Self-compiled (Source)
2021-03-11 19:13:27 +05:30
1. Edit `config/gitlab.yml`:
```yaml
gitlab:
application_settings_cache_seconds: 60
```
2021-06-08 01:23:25 +05:30
1. Save the file, and then [restart](restart_gitlab.md#installations-from-source)
2021-03-11 19:13:27 +05:30
GitLab for the changes to take effect.
2022-10-11 01:57:18 +05:30
::EndTabs