Force-refresh header balances after transfers and balance SSE events.
Invalidate balance caches on mutation, push SSE balance tick, and bypass 60s cache when refreshing funds. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -100,6 +100,11 @@ class InstanceLivePush:
|
||||
instance_live_push = InstanceLivePush()
|
||||
|
||||
|
||||
def notify_instance_balance_changed() -> int:
|
||||
"""划转/兑换后通知 embed 壳拉最新资金快照."""
|
||||
return instance_live_push.tick("balance")
|
||||
|
||||
|
||||
def register_instance_live_routes(app: Flask, login_required: Callable) -> None:
|
||||
instance_live_push.start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user