FIX: Invalidate site settings cache in all instances (#16155)

Previous cache implementation did not support multisite instances and
the cache was invalidated only in the instance where the change took
place.
This commit is contained in:
Bianca Nenciu
2022-03-11 17:16:56 +02:00
committed by GitHub
parent 94750c81fa
commit 7a416257df
2 changed files with 30 additions and 14 deletions

View File

@ -45,10 +45,6 @@ DiscourseEvent.on(:site_setting_changed) do |name, old_value, new_value|
SiteIconManager.ensure_optimized!
end
if SiteSetting::WATCHED_SETTINGS.include?(name)
SiteSetting.reset_cached_settings!
end
# Make sure medium and high priority thresholds were calculated.
if name == :reviewable_low_priority_threshold && Reviewable.min_score_for_priority(:medium) > 0
Reviewable.set_priorities(low: new_value)