Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add missing version information in the ModuleApi (#13947)
Browse files Browse the repository at this point in the history
  • Loading branch information
babolivier authored Sep 30, 2022
1 parent 6f0c3e6 commit 1cc2ca8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/13947.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add cache invalidation across workers to module API.
4 changes: 4 additions & 0 deletions synapse/module_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,8 @@ def register_cached_function(self, cached_func: CachedFunction) -> None:
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.
Expand All @@ -856,6 +858,8 @@ async def invalidate_cache(
"""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
Expand Down

0 comments on commit 1cc2ca8

Please sign in to comment.