summary refs log tree commit diff
diff options
context:
space:
mode:
authorreivilibre <oliverw@matrix.org>2022-01-21 08:01:37 +0000
committerGitHub <noreply@github.com>2022-01-21 08:01:37 +0000
commite83520cc42cb174a5d3dc5ca1dcce299ad4abb25 (patch)
treecc90c2e20c08b3d59f186cfa36d6a33d06cdcfa4
parentCorrectly await on_logged_out callbacks (#11786) (diff)
downloadsynapse-e83520cc42cb174a5d3dc5ca1dcce299ad4abb25.tar.xz
Make `get_account_data_for_room_and_type` a tree cache (#11789)
-rw-r--r--changelog.d/11789.feature1
-rw-r--r--synapse/storage/databases/main/account_data.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/11789.feature b/changelog.d/11789.feature
new file mode 100644
index 0000000000..dc426fb658
--- /dev/null
+++ b/changelog.d/11789.feature
@@ -0,0 +1 @@
+Remove account data (including client config, push rules and ignored users) upon user deactivation.
\ No newline at end of file
diff --git a/synapse/storage/databases/main/account_data.py b/synapse/storage/databases/main/account_data.py
index ef475e18c7..bb3740711e 100644
--- a/synapse/storage/databases/main/account_data.py
+++ b/synapse/storage/databases/main/account_data.py
@@ -210,7 +210,7 @@ class AccountDataWorkerStore(CacheInvalidationWorkerStore):
             "get_account_data_for_room", get_account_data_for_room_txn
         )
 
-    @cached(num_args=3, max_entries=5000)
+    @cached(num_args=3, max_entries=5000, tree=True)
     async def get_account_data_for_room_and_type(
         self, user_id: str, room_id: str, account_data_type: str
     ) -> Optional[JsonDict]: