mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 17:52:45 +08:00
FIX: Clear in-process theme cache after clearing DB cache (#11517)
If we clear the in-process cache first, it might get re-filled from the DB before we clear the DB cache. This would be more likely on high-traffic sites.
This commit is contained in:
parent
9870a0b6a1
commit
c54217f33d
@ -4,9 +4,9 @@ class ThemeTranslationOverride < ActiveRecord::Base
|
||||
belongs_to :theme
|
||||
|
||||
after_commit do
|
||||
theme.theme_fields.where(target_id: Theme.targets[:translations]).update_all(value_baked: nil)
|
||||
theme.clear_cached_settings!
|
||||
theme.remove_from_cache!
|
||||
theme.theme_fields.where(target_id: Theme.targets[:translations]).update_all(value_baked: nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user