From 1de53a7a1a6663351e23d1119f26caf56805a7c3 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 13 Dec 2016 17:33:24 +0000 Subject: Fix caching on public room list --- synapse/handlers/room_list.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py index 1e883b23f6..667223df0c 100644 --- a/synapse/handlers/room_list.py +++ b/synapse/handlers/room_list.py @@ -62,7 +62,7 @@ class RoomListHandler(BaseHandler): appservice and network id to use an appservice specific one. Setting to None returns all public rooms across all lists. """ - if search_filter or network_tuple is not (None, None): + if search_filter or (network_tuple and network_tuple.appservice_id is not None): # We explicitly don't bother caching searches or requests for # appservice specific lists. return self._get_public_room_list( @@ -73,7 +73,9 @@ class RoomListHandler(BaseHandler): if not result: result = self.response_cache.set( (limit, since_token), - self._get_public_room_list(limit, since_token) + self._get_public_room_list( + limit, since_token, network_tuple=network_tuple + ) ) return result -- cgit 1.4.1