summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-12-20 11:49:25 +0000
committerMatrix <matrix@matrix.org>2016-12-20 11:49:25 +0000
commitf5abaafabdd9cce67325edbb27c134fd6c7babd7 (patch)
tree9f4ab071d19b4953aa646741d9d4d84a5d219897 /synapse/handlers
parentUpdate changelog (diff)
downloadsynapse-f5abaafabdd9cce67325edbb27c134fd6c7babd7.tar.xz
uncommitted changes on matrix.org
These might be important? who knows?
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/room_list.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/synapse/handlers/room_list.py b/synapse/handlers/room_list.py

index 1e883b23f6..242e646e5c 100644 --- a/synapse/handlers/room_list.py +++ b/synapse/handlers/room_list.py
@@ -42,7 +42,7 @@ EMTPY_THIRD_PARTY_ID = ThirdPartyInstanceID(None, None) class RoomListHandler(BaseHandler): def __init__(self, hs): super(RoomListHandler, self).__init__(hs) - self.response_cache = ResponseCache(hs) + self.response_cache = ResponseCache(hs, timeout_ms=10 * 60 * 1000) self.remote_response_cache = ResponseCache(hs, timeout_ms=30 * 1000) def get_local_public_room_list(self, limit=None, since_token=None, @@ -62,18 +62,18 @@ 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: # We explicitly don't bother caching searches or requests for # appservice specific lists. return self._get_public_room_list( limit, since_token, search_filter, network_tuple=network_tuple, ) - result = self.response_cache.get((limit, since_token)) + result = self.response_cache.get((limit, since_token, network_tuple)) if not result: result = self.response_cache.set( - (limit, since_token), - self._get_public_room_list(limit, since_token) + (limit, since_token, network_tuple), + self._get_public_room_list(limit, since_token, network_tuple=network_tuple) ) return result