DEV: Refresh site settings on Redis fallback (#10700)

This ensures that all app instances have up-to-date data, even if they missed a message-bus update during the failover
This commit is contained in:
David Taylor 2020-09-18 11:44:25 +01:00 committed by GitHub
parent d83d9ec408
commit ce686a008f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,8 @@ if defined?(RailsFailover::Redis)
ObjectSpace.each_object(DistributedCache) do |cache|
cache.clear
end
SiteSetting.refresh!
end
if Rails.logger.respond_to? :chained