summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@element.io>2024-09-01 11:25:39 +0100
committerGitHub <noreply@github.com>2024-09-01 11:25:39 +0100
commit709b7363fe13705f37389cce3ab21f0285f359c8 (patch)
tree55b8e6e5379e3c534d1295c5b08e22cd3b39a1bd /synapse/storage/_base.py
parentSliding Sync: Split up `get_room_membership_for_user_at_to_token` (#17629) (diff)
downloadsynapse-709b7363fe13705f37389cce3ab21f0285f359c8.tar.xz
Sliding sync: use new DB tables (#17630)
Based on https://github.com/element-hq/synapse/pull/17629

Utilizing the new sliding sync tables added in
https://github.com/element-hq/synapse/pull/17512 for fast acquisition of
rooms for the user and filtering/sorting.

---------

Co-authored-by: Eric Eastwood <eric.eastwood@beta.gouv.fr>
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py

index 1ac85ad66d..d22160b85c 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py
@@ -126,6 +126,9 @@ class SQLBaseStore(metaclass=ABCMeta): self._attempt_to_invalidate_cache( "_get_rooms_for_local_user_where_membership_is_inner", (user_id,) ) + self._attempt_to_invalidate_cache( + "get_sliding_sync_rooms_for_user", (user_id,) + ) # Purge other caches based on room state. self._attempt_to_invalidate_cache("get_room_summary", (room_id,)) @@ -160,6 +163,7 @@ class SQLBaseStore(metaclass=ABCMeta): self._attempt_to_invalidate_cache("get_room_summary", (room_id,)) self._attempt_to_invalidate_cache("get_room_type", (room_id,)) self._attempt_to_invalidate_cache("get_room_encryption", (room_id,)) + self._attempt_to_invalidate_cache("get_sliding_sync_rooms_for_user", None) def _attempt_to_invalidate_cache( self, cache_name: str, key: Optional[Collection[Any]]