Make `get_account_data_for_room_and_type` a tree cache (#11789)

code_spécifique_watcha
reivilibre 3 years ago committed by GitHub
parent bfe6d5553a
commit e83520cc42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      changelog.d/11789.feature
  2. 2
      synapse/storage/databases/main/account_data.py

@ -0,0 +1 @@
Remove account data (including client config, push rules and ignored users) upon user deactivation.

@ -210,7 +210,7 @@ class AccountDataWorkerStore(CacheInvalidationWorkerStore):
"get_account_data_for_room", get_account_data_for_room_txn "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( async def get_account_data_for_room_and_type(
self, user_id: str, room_id: str, account_data_type: str self, user_id: str, room_id: str, account_data_type: str
) -> Optional[JsonDict]: ) -> Optional[JsonDict]:

Loading…
Cancel
Save