mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 03:11:09 +08:00
Allow DistributedCache#delete
to not publish changes.
This commit is contained in:
@ -46,7 +46,7 @@ class PostgreSQLFallbackHandler
|
|||||||
end
|
end
|
||||||
|
|
||||||
def master_up(namespace)
|
def master_up(namespace)
|
||||||
synchronize { @masters_down.delete(namespace) }
|
synchronize { @masters_down.delete(namespace, publish: false) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def initiate_fallback_to_master
|
def initiate_fallback_to_master
|
||||||
|
@ -128,9 +128,9 @@ class DistributedCache
|
|||||||
hash[k]
|
hash[k]
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete(k)
|
def delete(k, publish: true)
|
||||||
k = k.to_s if Symbol === k
|
k = k.to_s if Symbol === k
|
||||||
@manager.delete(self, k)
|
@manager.delete(self, k) if publish
|
||||||
hash.delete(k)
|
hash.delete(k)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user