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

Add missing version information in the ModuleApi #13947

Merged
merged 2 commits into from
Sep 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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