mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-11 14:30:08 -04:00
Extend ResponseCache
to pass a context object into the callback (#10157)
This is the first of two PRs which seek to address #8518. This first PR lays the groundwork by extending ResponseCache; a second PR (#10158) will update the SyncHandler to actually use it, and fix the bug. The idea here is that we allow the callback given to ResponseCache.wrap to decide whether its result should be cached or not. We do that by (optionally) passing a ResponseCacheContext into it, which it can modify.
This commit is contained in:
parent
13577aa55e
commit
d7808a2dde
5 changed files with 146 additions and 37 deletions
|
@ -345,7 +345,7 @@ class ReplicationUserJoinedLeftRoomRestServlet(ReplicationEndpoint):
|
|||
|
||||
return {}
|
||||
|
||||
def _handle_request( # type: ignore
|
||||
async def _handle_request( # type: ignore
|
||||
self, request: Request, room_id: str, user_id: str, change: str
|
||||
) -> Tuple[int, JsonDict]:
|
||||
logger.info("user membership change: %s in %s", user_id, room_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue