mirror of
				https://github.com/matrix-org/synapse.git
				synced 2025-11-04 02:01:03 +01:00 
			
		
		
		
	Fix caching on public room list
This commit is contained in:
		
							parent
							
								
									8588d0eb3d
								
							
						
					
					
						commit
						1de53a7a1a
					
				@ -62,7 +62,7 @@ class RoomListHandler(BaseHandler):
 | 
				
			|||||||
                appservice and network id to use an appservice specific one.
 | 
					                appservice and network id to use an appservice specific one.
 | 
				
			||||||
                Setting to None returns all public rooms across all lists.
 | 
					                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
 | 
					            # We explicitly don't bother caching searches or requests for
 | 
				
			||||||
            # appservice specific lists.
 | 
					            # appservice specific lists.
 | 
				
			||||||
            return self._get_public_room_list(
 | 
					            return self._get_public_room_list(
 | 
				
			||||||
@ -73,7 +73,9 @@ class RoomListHandler(BaseHandler):
 | 
				
			|||||||
        if not result:
 | 
					        if not result:
 | 
				
			||||||
            result = self.response_cache.set(
 | 
					            result = self.response_cache.set(
 | 
				
			||||||
                (limit, since_token),
 | 
					                (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
 | 
					        return result
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user