mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
PERF: Eradicate N+1 queries from the theme admin page
This commit is contained in:
@@ -9,6 +9,7 @@ class ThemeSetting < ActiveRecord::Base
|
||||
theme.clear_cached_settings!
|
||||
theme.remove_from_cache!
|
||||
theme.theme_fields.update_all(value_baked: nil)
|
||||
theme.theme_settings.reload
|
||||
SvgSprite.expire_cache if self.name.to_s.include?("_icon")
|
||||
CSP::Extension.clear_theme_extensions_cache! if name.to_s == CSP::Extension::THEME_SETTING
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user