diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2020-05-27 17:35:29 +0200 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2020-05-27 17:35:29 +0200 |
commit | 5af572ada049a8bf78c0d97b66c62897a7466f0d (patch) | |
tree | 4cf47e2ef15b230080f5e80ff9e30e515f348e21 /synapse/util/caches/lrucache.py | |
parent | Fix incorrect placeholder syntax in database prepartion code (#7575) (diff) | |
parent | Improve changelog wording (diff) | |
download | synapse-5af572ada049a8bf78c0d97b66c62897a7466f0d.tar.xz |
Merge tag 'v1.14.0rc2' into develop
Synapse 1.14.0rc2 (2020-05-27) ============================== Bugfixes -------- - Fix cache config to not apply cache factor to event cache. Regression in v1.14.0rc1. ([\#7578](https://github.com/matrix-org/synapse/issues/7578)) - Fix bug where `ReplicationStreamer` was not always started when replication was enabled. Bug introduced in v1.14.0rc1. ([\#7579](https://github.com/matrix-org/synapse/issues/7579)) - Fix specifying individual cache factors for caches with special characters in their name. Regression in v1.14.0rc1. ([\#7580](https://github.com/matrix-org/synapse/issues/7580)) Improved Documentation ---------------------- - Fix the OIDC `client_auth_method` value in the sample config. ([\#7581](https://github.com/matrix-org/synapse/issues/7581))
Diffstat (limited to 'synapse/util/caches/lrucache.py')
-rw-r--r-- | synapse/util/caches/lrucache.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/util/caches/lrucache.py b/synapse/util/caches/lrucache.py index 29fabac3cd..df4ea5901d 100644 --- a/synapse/util/caches/lrucache.py +++ b/synapse/util/caches/lrucache.py @@ -81,6 +81,7 @@ class LruCache(object): """ cache = cache_type() self.cache = cache # Used for introspection. + self.apply_cache_factor_from_config = apply_cache_factor_from_config # Save the original max size, and apply the default size factor. self._original_max_size = max_size @@ -294,6 +295,9 @@ class LruCache(object): 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 |