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

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
erikjohnston committed Feb 19, 2019
1 parent 1bb35e3 commit 62175a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/tcp_replication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,8 @@ However, there are times when a number of caches need to be invalidated at the
same time with the same key. To reduce traffic we batch those invalidations into
a single poke by defining a special cache name that workers understand to mean
to expand to invalidate the correct caches.

Currently the special cache names are declared in ``synapse/storage/_base.py``
and are:

1. ``cs_cache_fake`` ─ invalidates caches that depend on the current state
5 changes: 3 additions & 2 deletions synapse/storage/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ def _invalidate_state_caches_and_stream(self, txn, room_id, members_changed):
Args:
txn
room_id (str): Room where state changed
members_changed (Iterable[str]): The user_ids of members that have changed
members_changed (iterable[str]): The user_ids of members that have changed
"""
txn.call_after(self._invalidate_state_caches, room_id, members_changed)

Expand All @@ -1216,7 +1216,8 @@ def _invalidate_state_caches(self, room_id, members_changed):
Args:
room_id (str): Room where state changed
members_changed (set[str]): The user_ids of members that have changed
members_changed (iterable[str]): The user_ids of members that have
changed
"""
for member in members_changed:
self.get_rooms_for_user_with_stream_ordering.invalidate((member,))
Expand Down

0 comments on commit 62175a2

Please sign in to comment.