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

Don't apply cache factor to event cache. #7578

Merged
merged 3 commits into from
May 27, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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/7578.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix cache config to not apply cache factor to event cache. Regression in v1.14.0rc1.
3 changes: 3 additions & 0 deletions synapse/util/caches/lrucache.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ def set_cache_factor(self, factor: float) -> bool:
Returns:
bool: Whether the cache changed size or not.
"""
if not self.apply_cache_factor_from_config:
return False

new_size = int(self._original_max_size * factor)
if new_size != self.max_size:
self.max_size = new_size
Expand Down