mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:13:39 +08:00
DEV: Clear all DistributedCache
on Redis fallback.
This commit is contained in:
parent
a957a980e2
commit
d83d9ec408
|
@ -13,6 +13,10 @@ if defined?(RailsFailover::Redis)
|
|||
Discourse.clear_redis_readonly!
|
||||
Discourse.request_refresh!
|
||||
MessageBus.keepalive_interval = message_bus_keepalive_interval
|
||||
|
||||
ObjectSpace.each_object(DistributedCache) do |cache|
|
||||
cache.clear
|
||||
end
|
||||
end
|
||||
|
||||
if Rails.logger.respond_to? :chained
|
||||
|
|
Loading…
Reference in New Issue
Block a user