summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorAmber H. Brown <hawkowl@atleastfornow.net>2020-02-27 23:18:12 +1100
committerAmber H. Brown <hawkowl@atleastfornow.net>2020-02-27 23:18:12 +1100
commit965e25942637a597775099582b718db593ccd7e0 (patch)
tree7fc8903543d6104c24fd7aefcff5f9a99c8bbc65 /synapse
parentfix (diff)
downloadsynapse-965e25942637a597775099582b718db593ccd7e0.tar.xz
fixes
Diffstat (limited to 'synapse')
-rw-r--r--synapse/util/caches/lrucache.py3
-rw-r--r--synapse/util/caches/stream_change_cache.py3
2 files changed, 2 insertions, 4 deletions
diff --git a/synapse/util/caches/lrucache.py b/synapse/util/caches/lrucache.py
index 8ff23a72da..5802898c6d 100644
--- a/synapse/util/caches/lrucache.py
+++ b/synapse/util/caches/lrucache.py
@@ -16,7 +16,6 @@
 import threading
 from functools import wraps
 
-from synapse.config import cache as cache_config
 from synapse.util.caches.treecache import TreeCache
 
 
@@ -79,7 +78,7 @@ class LruCache(object):
 
         # Save the original max size, and apply the default size factor.
         self._original_max_size = max_size
-        self.max_size = int(max_size * cache_config.DEFAULT_CACHE_SIZE_FACTOR)
+        self.max_size = int(max_size)
 
         list_root = _Node(None, None, None, None)
         list_root.next_node = list_root
diff --git a/synapse/util/caches/stream_change_cache.py b/synapse/util/caches/stream_change_cache.py
index fe0b99ae24..9b7b0308eb 100644
--- a/synapse/util/caches/stream_change_cache.py
+++ b/synapse/util/caches/stream_change_cache.py
@@ -20,7 +20,6 @@ from six import integer_types
 
 from sortedcontainers import SortedDict
 
-from synapse.config import cache as cache_config
 from synapse.util import caches
 
 logger = logging.getLogger(__name__)
@@ -38,7 +37,7 @@ class StreamChangeCache(object):
 
     def __init__(self, name, current_stream_pos, max_size=10000, prefilled_cache=None):
         self._original_max_size = max_size
-        self.max_size = math.floor(max_size * cache_config.DEFAULT_CACHE_SIZE_FACTOR)
+        self.max_size = math.floor(max_size)
         self._entity_to_key = {}
         self._cache = SortedDict()
         self._earliest_known_stream_pos = current_stream_pos