mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-03 06:36:23 +08:00
This commit fixes an issue in multi-process setups where the following would happen: 1. Admin changes a theme site setting. The new value is stored in memory in the process that made the change. For this example, changing `enable_welcome_banner` from `true` to `false` 2. Another user visits the site and hits another process, which has the old value of `enable_welcome_banner` still set to `true` in memory 3. The other user's value for `enable_welcome_banner` is cached in the cache for theme site settings, which is shared across all processes The issue is fixed by doing the same thing as site settings: when the new value is saved, we send a MessageBus message to all processes via `SiteSettingExtension` which calls `refresh!` and reloads the in-memory cache of theme site settings from the DB. c.f. https://meta.discourse.org/t/difficulty-understanding-the-enable-welcome-banner-setting/377321 |
||
|---|---|---|
| .. | ||
| locales | ||
| shared_examples | ||
| backups_helpers.rb | ||
| bookmarkable_helper.rb | ||
| concurrency.rb | ||
| diagnostics_helper.rb | ||
| discourse_event_helper.rb | ||
| dom_matcher.rb | ||
| fake_bookmark_hashtag_data_source.rb | ||
| fake_logger.rb | ||
| fake_s3.rb | ||
| fast_image_helpers.rb | ||
| final_destination_helper.rb | ||
| helpers.rb | ||
| i18n_helpers.rb | ||
| imap_helper.rb | ||
| integration_helpers.rb | ||
| match_html_matcher.rb | ||
| mock_git_importer.rb | ||
| negated_matcher.rb | ||
| omniauth_helpers.rb | ||
| onebox_helpers.rb | ||
| problem_check_matcher.rb | ||
| rate_limit_matcher.rb | ||
| sample_plugin_site_settings.yml | ||
| service_matchers.rb | ||
| sidekiq_helpers.rb | ||
| site_settings_helpers.rb | ||
| system_helpers.rb | ||
| test_second_factor_action.rb | ||
| time_matcher.rb | ||
| topic_guardian_can_see_consistency_check.rb | ||
| ts_vector_matcher.rb | ||
| uploads_helpers.rb | ||
| webauthn_integration_helpers.rb | ||