summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-02-14 13:45:30 +0000
committerRichard van der Hoff <richard@matrix.org>2018-06-22 15:58:14 +0100
commita285fe05fd7bfcca3953976e7b3356dc39b020a7 (patch)
tree78b0d84d111aa36ad4efd3ddd87ad7c47fe19c2e
parentMerge pull request #3435 from matrix-org/rav/fix_event_push_actions_tablescan (diff)
downloadsynapse-a285fe05fd7bfcca3953976e7b3356dc39b020a7.tar.xz
Add timeout to ResponseCache of /public_rooms
-rw-r--r--synapse/handlers/room_list.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py

index fc507cef36..878db0db1e 100644 --- a/synapse/handlers/room_list.py +++ b/synapse/handlers/room_list.py
@@ -46,9 +46,12 @@ EMTPY_THIRD_PARTY_ID = ThirdPartyInstanceID(None, None) class RoomListHandler(BaseHandler): def __init__(self, hs): super(RoomListHandler, self).__init__(hs) - self.response_cache = ResponseCache(hs, "room_list") - self.remote_response_cache = ResponseCache(hs, "remote_room_list", - timeout_ms=30 * 1000) + self.response_cache = ResponseCache( + hs, "room_list", timeout_ms=10 * 60 * 1000, + ) + self.remote_response_cache = ResponseCache( + hs, "remote_room_list", timeout_ms=30 * 1000, + ) def get_local_public_room_list(self, limit=None, since_token=None, search_filter=None,