diff options
author | Erik Johnston <erik@matrix.org> | 2017-07-04 09:56:44 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-07-04 09:56:44 +0100 |
commit | b5e8d529e610352e0eb3887fac67a8ca5897bec1 (patch) | |
tree | 370d5d247ea3edcce7bf99aa7affe9ff1038ef87 /synapse/storage/client_ips.py | |
parent | Merge pull request #2321 from matrix-org/erikj/prefill_forward (diff) | |
download | synapse-b5e8d529e610352e0eb3887fac67a8ca5897bec1.tar.xz |
Define CACHE_SIZE_FACTOR once
Diffstat (limited to 'synapse/storage/client_ips.py')
-rw-r--r-- | synapse/storage/client_ips.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/storage/client_ips.py b/synapse/storage/client_ips.py index 88a5eb232f..fc468ea185 100644 --- a/synapse/storage/client_ips.py +++ b/synapse/storage/client_ips.py @@ -20,7 +20,8 @@ from twisted.internet import defer, reactor from ._base import Cache from . import background_updates -import os +from synapse.util.caches import CACHE_SIZE_FACTOR + logger = logging.getLogger(__name__) @@ -30,9 +31,6 @@ logger = logging.getLogger(__name__) LAST_SEEN_GRANULARITY = 120 * 1000 -CACHE_SIZE_FACTOR = float(os.environ.get("SYNAPSE_CACHE_FACTOR", 0.1)) - - class ClientIpStore(background_updates.BackgroundUpdateStore): def __init__(self, hs): self.client_ip_last_seen = Cache( |