Add missing version information in the ModuleApi (#13947)

pull/13976/head
Brendan Abolivier 2022-09-30 11:27:21 +01:00 committed by GitHub
parent 6f0c3e669d
commit 1cc2ca81ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1 @@
Add cache invalidation across workers to module API.

View File

@ -842,6 +842,8 @@ class ModuleApi:
however invalidation that needs to go to other workers needs to call `invalidate_cache`
on the module API instead.
Added in Synapse v1.69.0.
Args:
cached_function: The cached function that will be registered to receive invalidation
locally and from other workers.
@ -856,6 +858,8 @@ class ModuleApi:
"""Invalidate a cache entry of a cached function across workers. The cached function
needs to be registered on all workers first with `register_cached_function`.
Added in Synapse v1.69.0.
Args:
cached_function: The cached function that needs an invalidation
keys: keys of the entry to invalidate, usually matching the arguments of the