summary refs log tree commit diff
path: root/synapse/storage/databases/main/cache.py
diff options
context:
space:
mode:
authorShay <hillerys@element.io>2023-08-22 07:15:34 -0700
committerGitHub <noreply@github.com>2023-08-22 14:15:34 +0000
commit69048f7b4848ab6a4ae6cb233f8cbf36d73c0ba1 (patch)
tree36358213ec30b624ac550e77c9df7f318776676e /synapse/storage/databases/main/cache.py
parentBump serde from 1.0.183 to 1.0.184 (#16139) (diff)
downloadsynapse-69048f7b4848ab6a4ae6cb233f8cbf36d73c0ba1.tar.xz
Add an admin endpoint to allow authorizing server to signal token revocations (#16125)
Diffstat (limited to 'synapse/storage/databases/main/cache.py')
-rw-r--r--synapse/storage/databases/main/cache.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/cache.py b/synapse/storage/databases/main/cache.py
index 2fbd389c71..18905e07b6 100644
--- a/synapse/storage/databases/main/cache.py
+++ b/synapse/storage/databases/main/cache.py
@@ -584,6 +584,19 @@ class CacheInvalidationWorkerStore(SQLBaseStore):
         else:
             return 0
 
+    async def stream_introspection_token_invalidation(
+        self, key: Tuple[Optional[str]]
+    ) -> None:
+        """
+        Stream an invalidation request for the introspection token cache to workers
+
+        Args:
+            key: token_id of the introspection token to remove from the cache
+        """
+        await self.send_invalidation_to_replication(
+            "introspection_token_invalidation", key
+        )
+
     @wrap_as_background_process("clean_up_old_cache_invalidations")
     async def _clean_up_cache_invalidation_wrapper(self) -> None:
         """