Skip to content

Commit bc8bc50

Browse files
committed
Use non-streaming cache invalidations in store methods
1 parent 33229e8 commit bc8bc50

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

synapse/storage/databases/main/thread_subscriptions.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,8 @@ def _subscribe_user_to_thread_txn(txn: LoggingTransaction) -> Optional[int]:
165165
values=values,
166166
)
167167

168-
self._invalidate_cache_and_stream(
169-
txn,
170-
self.get_subscription_for_thread,
168+
txn.call_after(
169+
self.get_subscription_for_thread.invalidate,
171170
(user_id, room_id, thread_root_event_id),
172171
)
173172

@@ -230,9 +229,8 @@ def _unsubscribe_user_from_thread_txn(txn: LoggingTransaction) -> Optional[int]:
230229
},
231230
)
232231

233-
self._invalidate_cache_and_stream(
234-
txn,
235-
self.get_subscription_for_thread,
232+
txn.call_after(
233+
self.get_subscription_for_thread.invalidate,
236234
(user_id, room_id, thread_root_event_id),
237235
)
238236

0 commit comments

Comments
 (0)