Skip to content

Commit 7c9ac01

Browse files
authored
Fix bug where StreamChangeCache would not respect cache factors (#17152)
Annoyingly mypy didn't pick up this typo.
1 parent 3818597 commit 7c9ac01

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog.d/17152.bugfix

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug where `StreamChangeCache` would not respect configured cache factors.

synapse/util/caches/stream_change_cache.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def set_cache_factor(self, factor: float) -> bool:
115115
"""
116116
new_size = math.floor(self._original_max_size * factor)
117117
if new_size != self._max_size:
118-
self.max_size = new_size
118+
self._max_size = new_size
119119
self._evict()
120120
return True
121121
return False

0 commit comments

Comments
 (0)