mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 09:03:45 +08:00
FIX: Switch recently readonly mdoe cache to a DistributedCache
.
A per process cache is hard to reason about. During PostgreSQL failovers. The site may bounce in and out of readonly mode depending on which server and process that a request hits.
This commit is contained in:
parent
704a122656
commit
e75ad37aaf
|
@ -354,7 +354,7 @@ module Discourse
|
|||
end
|
||||
|
||||
def self.last_read_only
|
||||
@last_read_only ||= {}
|
||||
@last_read_only ||= DistributedCache.new('last_read_only', namespace: false)
|
||||
end
|
||||
|
||||
def self.recently_readonly?
|
||||
|
|
Loading…
Reference in New Issue
Block a user