Skip to content
Snippets Groups Projects
Commit 281553af authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Merge pull request #2062 from matrix-org/erikj/presence_replication

Use presence replication stream to invalidate cache
parents 31d56c3f 987f4945
No related branches found
No related tags found
No related merge requests found
......@@ -57,5 +57,6 @@ class SlavedPresenceStore(BaseSlavedStore):
self.presence_stream_cache.entity_has_changed(
user_id, position
)
self._get_presence_for_user.invalidate((user_id,))
return super(SlavedPresenceStore, self).process_replication(result)
......@@ -85,8 +85,8 @@ class PresenceStore(SQLBaseStore):
self.presence_stream_cache.entity_has_changed,
state.user_id, stream_id,
)
self._invalidate_cache_and_stream(
txn, self._get_presence_for_user, (state.user_id,)
txn.call_after(
self._get_presence_for_user.invalidate, (state.user_id,)
)
# Actually insert new rows
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment